diff options
author | Simon Rettberg | 2017-10-31 23:21:30 +0100 |
---|---|---|
committer | Simon Rettberg | 2017-10-31 23:21:30 +0100 |
commit | 858fef5c8fc0c1b4c237dc65499756c3664492d8 (patch) | |
tree | 9850f2f082f67f1258519d614e1edc5c6a5501d5 /src/server/locks.c | |
parent | [SERVER] net.c: Refactoring and renaming (diff) | |
download | dnbd3-858fef5c8fc0c1b4c237dc65499756c3664492d8.tar.gz dnbd3-858fef5c8fc0c1b4c237dc65499756c3664492d8.tar.xz dnbd3-858fef5c8fc0c1b4c237dc65499756c3664492d8.zip |
[*] Mark logadd() as printf-style function, fix errors that it revealed
...there were quite a few format string errors as it turns out :/
Diffstat (limited to 'src/server/locks.c')
-rw-r--r-- | src/server/locks.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/locks.c b/src/server/locks.c index 3bd5103..71a1845 100644 --- a/src/server/locks.c +++ b/src/server/locks.c @@ -105,7 +105,7 @@ int debug_spin_lock(const char *name, const char *file, int line, pthread_spinlo } pthread_spin_unlock( &initdestory ); if ( t == NULL ) { - logadd( LOG_ERROR, "Lock sanity check: Too many waiting threads at %s:%d\n", (void*)lock, name, file, line ); + logadd( LOG_ERROR, "Lock sanity check: Too many waiting threads for lock %p (%s) at %s:%d\n", (void*)lock, name, file, line ); exit( 4 ); } const int retval = pthread_spin_lock( lock ); @@ -155,7 +155,7 @@ int debug_spin_trylock(const char *name, const char *file, int line, pthread_spi } pthread_spin_unlock( &initdestory ); if ( t == NULL ) { - logadd( LOG_ERROR, "Lock sanity check: Too many waiting threads at %s:%d\n", (void*)lock, name, file, line ); + logadd( LOG_ERROR, "Lock sanity check: Too many waiting threads for %p (%s) at %s:%d\n", (void*)lock, name, file, line ); exit( 4 ); } const int retval = pthread_spin_trylock( lock ); |