aboutsummaryrefslogtreecommitdiffstats
path: root/util.c
diff options
context:
space:
mode:
authorulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>2005-08-08 18:50:39 +0000
committerulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>2005-08-08 18:50:39 +0000
commitd615067ecfe859cadfb09c0896864a4bff299d4f (patch)
treeae44175ca8fd23548fcec5833098b535af5e372c /util.c
parentb5ff280c656047376ee397671794e3b15e7ac3ae (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 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15264 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'util.c')
-rw-r--r--util.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/util.c b/util.c
index 6eb8297a32..f6ed670b13 100644
--- a/util.c
+++ b/util.c
@@ -41,10 +41,6 @@
#include <sys/stat.h>
#endif
-#ifdef NEED_SNPRINTF_H
-# include "snprintf.h"
-#endif
-
#ifdef NEED_MKSTEMP
#include "mkstemp.h"
#endif
@@ -141,7 +137,7 @@ try_tempfile(char *namebuf, int namebuflen, const char *dir, const char *pfx)
/* Stick in a truncated name, so that if this error is
reported with the file name, you at least get
something. */
- snprintf(namebuf, namebuflen, "%s%s%s", dir, pfx, suffix);
+ g_snprintf(namebuf, namebuflen, "%s%s%s", dir, pfx, suffix);
errno = ENAMETOOLONG;
return -1;
}