aboutsummaryrefslogtreecommitdiffstats
path: root/ringbuffer.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2005-08-08 18:50:39 +0000
committerUlf Lamping <ulf.lamping@web.de>2005-08-08 18:50:39 +0000
commit0dc9fb3d4ab00d14bf45c597471e10e601efd4d4 (patch)
treeae44175ca8fd23548fcec5833098b535af5e372c /ringbuffer.c
parentf3407856f4fd97caf90655205cdb2c66991e75ba (diff)
various code cleanup:
-use g_snprintf instead of sprintf and snprintf -use g_strdup_printf where appropriate -remove #include "snprintf.h" (as only g_snprintf should be used) -replace some more alloc/realloc/calloc/free with their glib pendants svn path=/trunk/; revision=15264
Diffstat (limited to 'ringbuffer.c')
-rw-r--r--ringbuffer.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/ringbuffer.c b/ringbuffer.c
index 4cfc637a3c..02c66138a2 100644
--- a/ringbuffer.c
+++ b/ringbuffer.c
@@ -69,10 +69,6 @@
#include <time.h>
#include <errno.h>
-#ifdef NEED_SNPRINTF_H
-#include "snprintf.h"
-#endif
-
#include "wiretap/wtap.h"
#include "ringbuffer.h"
@@ -127,7 +123,7 @@ static int ringbuf_open_file(rb_file *rfile, int *err)
#endif
current_time = time(NULL);
- snprintf(filenum, sizeof(filenum), "%05d", rb_data.curr_file_num + 1 /*.number*/);
+ g_snprintf(filenum, sizeof(filenum), "%05d", rb_data.curr_file_num + 1 /*.number*/);
strftime(timestr, sizeof(timestr), "%Y%m%d%H%M%S", localtime(&current_time));
rfile->name = g_strconcat(rb_data.fprefix, "_", filenum, "_", timestr,
rb_data.fsuffix, NULL);