libroot: Style cleanups in assert.c.
This commit is contained in:
@@ -14,22 +14,24 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
||||||
extern char *__progname;
|
extern char* __progname;
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
__assert_fail(const char *assertion, const char *file,
|
__assert_fail(const char *assertion, const char* file, unsigned int line,
|
||||||
unsigned int line, const char *function)
|
const char* function)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s: %s:%d:%s: %s\n", __progname, file, line, function, assertion);
|
fprintf(stderr, "%s: %s:%d:%s: %s\n", __progname, file, line, function,
|
||||||
|
assertion);
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
__assert_perror_fail(int error, const char *file,
|
__assert_perror_fail(int error, const char* file, unsigned int line,
|
||||||
unsigned int line, const char *function)
|
const char* function)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s: %s:%d:%s: %s\n", __progname, file, line, function, strerror(error));
|
fprintf(stderr, "%s: %s:%d:%s: %s\n", __progname, file, line, function,
|
||||||
|
strerror(error));
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user