]> code.citadel.org Git - citadel.git/blobdiff - citadel/ecrash.c
fix source so that '-Wformat -Werror=format-security' doesn't stop us from compiling
[citadel.git] / citadel / ecrash.c
index b03e2fe10545fdc709651eb400c1483062f008bd..30fcfcdad2b42f64f916bf93f5d3e5660c2a8dcd 100644 (file)
@@ -185,8 +185,7 @@ static void outputPrintf(char *format, ...)
 
        va_start(ap, format);
 
-       snprintf (StaticBuf, SIZ, format, ap);
-       syslog( LOG_CRIT|LOG_NDELAY|LOG_MAIL, StaticBuf);
+       vsyslog(LOG_CRIT|LOG_NDELAY|LOG_MAIL, format, ap);
 } // outputPrintf
 
 
@@ -204,16 +203,12 @@ static void createGlobalBacktrace( void )
        size = backtrace(stack_frames, sizeof(stack_frames) / sizeof(void*));
        for (NThread = 0; NThread < size; NThread++) 
        {
-               snprintf (StaticBuf, SIZ, "RAW: %p  ", stack_frames[NThread]);
-               syslog( LOG_CRIT|LOG_NDELAY|LOG_MAIL, StaticBuf);
+               syslog(LOG_CRIT|LOG_NDELAY|LOG_MAIL, "RAW: %p  ", stack_frames[NThread]);
        }
-       
        strings = backtrace_symbols(stack_frames, size);
        for (NThread = 0; NThread < size; NThread++) {
                if (strings != NULL) {
-                       // vsyslogs printf compliance sucks.
-                       snprintf (StaticBuf, SIZ, "RAW: %p  ", strings[NThread]);
-                       syslog( LOG_CRIT|LOG_NDELAY|LOG_MAIL, StaticBuf);
+                       syslog(LOG_CRIT|LOG_NDELAY|LOG_MAIL, "RAW: %p  ", strings[NThread]);
                }
        }
 } /* createGlobalBacktrace */
@@ -223,8 +218,7 @@ static void outputRawtrace( void )
        size = backtrace(stack_frames, sizeof(stack_frames) / sizeof(void*));
        for (NThread = 0; NThread < size; NThread++) 
        {
-               snprintf (StaticBuf, SIZ, "RAW: %p  ", stack_frames[NThread]);
-               syslog( LOG_CRIT|LOG_NDELAY|LOG_MAIL, StaticBuf);
+               syslog(LOG_CRIT|LOG_NDELAY|LOG_MAIL, "RAW: %p  ", stack_frames[NThread]);
        }
 } /* createGlobalBacktrace */