aboutsummaryrefslogtreecommitdiffstats
path: root/editcap.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2013-03-05 22:15:20 +0000
committerAnders Broman <anders.broman@ericsson.com>2013-03-05 22:15:20 +0000
commitb204e38aef8bf9905e8d3d1e44361ae77a8f0c3f (patch)
treeb191b3f59b27d26b9f9fc82f64c8b4f8d756467c /editcap.c
parentfaa06129a916b6021faa22cc3eb0d6312e9e22a2 (diff)
Use explicit casts.
svn path=/trunk/; revision=48108
Diffstat (limited to 'editcap.c')
-rw-r--r--editcap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/editcap.c b/editcap.c
index f1fdf7dcb5..5331d0f897 100644
--- a/editcap.c
+++ b/editcap.c
@@ -168,7 +168,7 @@ static gchar *
abs_time_to_str_with_sec_resolution(const struct wtap_nstime *abs_time)
{
struct tm *tmp;
- gchar *buf = g_malloc(16);
+ gchar *buf = (gchar *)g_malloc(16);
#if (defined _WIN32) && (_MSC_VER < 1500)
/* calling localtime() on MSVC 2005 with huge values causes it to crash */
@@ -785,7 +785,7 @@ list_capture_types(void) {
struct string_elem *captypes;
GSList *list = NULL;
- captypes = g_malloc(sizeof(struct string_elem) * WTAP_NUM_FILE_TYPES);
+ captypes = g_new(struct string_elem,WTAP_NUM_FILE_TYPES);
fprintf(stderr, "editcap: The available capture file types for the \"-F\" flag are:\n");
for (i = 0; i < WTAP_NUM_FILE_TYPES; i++) {
if (wtap_dump_can_open(i)) {