diff options
author | Haru <haru@dotalux.com> | 2014-08-07 03:39:13 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2014-08-07 05:37:38 +0200 |
commit | c45e3fa9793a273a0eab40d1626bcda7d710552c (patch) | |
tree | 4f6c9d47770a15c8cbfe065f7ee9203f77e57022 /src/common/mutex.c | |
parent | caf89724767465ecf339c391bb6d7a937d563fb2 (diff) | |
download | hercules-c45e3fa9793a273a0eab40d1626bcda7d710552c.tar.gz hercules-c45e3fa9793a273a0eab40d1626bcda7d710552c.tar.bz2 hercules-c45e3fa9793a273a0eab40d1626bcda7d710552c.tar.xz hercules-c45e3fa9793a273a0eab40d1626bcda7d710552c.zip |
Corrected several format-string errors through the code
- Functions that expect a printf-style format string are now marked as
such, so that gcc/clang will emit a warning warn you if you mismatch
format string and arguments.
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/common/mutex.c')
-rw-r--r-- | src/common/mutex.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common/mutex.c b/src/common/mutex.c index ea3e0f8ce..f046febf6 100644 --- a/src/common/mutex.c +++ b/src/common/mutex.c @@ -54,8 +54,8 @@ ramutex *ramutex_create(void) { struct ramutex *m; m = (struct ramutex*)aMalloc( sizeof(struct ramutex) ); - if(m == NULL){ - ShowFatalError("ramutex_create: OOM while allocating %u bytes.\n", sizeof(struct ramutex)); + if (m == NULL) { + ShowFatalError("ramutex_create: OOM while allocating %"PRIuS" bytes.\n", sizeof(struct ramutex)); return NULL; } @@ -128,8 +128,8 @@ racond *racond_create(void) { struct racond *c; c = (struct racond*)aMalloc( sizeof(struct racond) ); - if(c == NULL){ - ShowFatalError("racond_create: OOM while allocating %u bytes\n", sizeof(struct racond)); + if (c == NULL) { + ShowFatalError("racond_create: OOM while allocating %"PRIuS" bytes\n", sizeof(struct racond)); return NULL; } |