diff options
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/log.c | 6 |
2 files changed, 4 insertions, 3 deletions
@@ -88,6 +88,7 @@ o import only required C headers and put local headers on top to check o fix double free() bug in the error output path of mcast_create() o eliminate unsed cache_get_conntrack() in rs_list_to_tx() o remove capability code and rely on the error returned by the syscall +o use fputs() instead of fprintf() in log.c version 0.9.5 (2007/07/29) ------------------------------ @@ -104,7 +104,7 @@ void dlog_buffered_ct_flush(void *buffer_data, void *data) { FILE *fd = data; - fprintf(fd, "%s", (const char*)buffer_data); + fputs((const char*)buffer_data, fd); fflush(fd); } @@ -124,7 +124,7 @@ void dlog_buffered_ct(FILE *fd, struct buffer *b, struct nf_conntrack *ct) snprintf(buf+strlen(buf), 1024-strlen(buf), "\n"); /* zero size buffer: force fflush */ if (buffer_size(b) == 0) { - fprintf(fd, "%s", buf); + fputs(buf, fd); fflush(fd); } @@ -132,7 +132,7 @@ void dlog_buffered_ct(FILE *fd, struct buffer *b, struct nf_conntrack *ct) buffer_flush(b, dlog_buffered_ct_flush, fd); if (buffer_add(b, buf, strlen(buf)) == -1) { /* buffer too small, catacrocket! */ - fprintf(fd, "%s", buf); + fputs(buf, fd); fflush(fd); } } |