X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=src%2Fdebug.c;h=22adf0cf9ac3596997926d7a89e944df9d4579d9;hb=5b66ad22854dc7084805ce4147780173264436b5;hp=d489943439fe9acc8448f1fe20d1d3ce06101366;hpb=cc5fd938f5bd3caa1fabde9286a96b7d68b5a5f9;p=spider.git diff --git a/src/debug.c b/src/debug.c index d4899434..22adf0cf 100755 --- a/src/debug.c +++ b/src/debug.c @@ -141,14 +141,14 @@ void dbg(unsigned long level, char *format, ...) rotate_log(); - sprintf(dbuf, "%s %s[%d,%04x] ", dbgtime(), prog, pid, level); + sprintf(dbuf, "%s %s[%d,%04lx] ", dbgtime(), prog, pid, level); va_start(ap, format); vsprintf(buf, format, ap); i = strlen(buf); if (i>1 && buf[i-1] == '\n') buf[i-1] = 0; - fprintf(f, dbuf); - fprintf(f, buf); + fprintf(f, "%s", dbuf); + fprintf(f, "%s", buf); fputc('\n', f); va_end(ap); fflush(f); @@ -172,7 +172,7 @@ void dbgdump(unsigned long level, char *dir, unsigned char *s, int lth) rotate_log(); - sprintf(buf, "%s %s[%d,%04x] %s Lth: %d", dbgtime(), prog, pid, level, dir, lth); + sprintf(buf, "%s %s[%d,%04lx] %s Lth: %d", dbgtime(), prog, pid, level, dir, lth); fprintf(f, "%s\n", buf); if (dbgproc) { (dbgproc)(buf);