/* Writes the last error message to the standard error. */ void PrintError(const char* message) { char buffer[256]; if (NaClGetLastErrorString(buffer, sizeof buffer) == 0) { fprintf(stderr, "%s: %s", message, buffer); } }
/* Writes the last error message to the standard error. */ static void failWithErrno(const char* message) { char buffer[256]; if (0 == NaClGetLastErrorString(buffer, sizeof(buffer))) { fprintf(stderr, "%s: %s", message, buffer); } exit(EXIT_FAILURE); }