Fix 4 warnings in case of strict-aliasing by declaring timestamp as time_t

instead of int.

svn path=/trunk/; revision=8618
This commit is contained in:
Jörg Mayer 2003-10-06 02:01:47 +00:00
parent 803dc3a339
commit e5a9846c56
1 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@
* By Steve Limkemann <stevelim@dgtech.com>
* Copyright 1998 Steve Limkemann
*
* $Id: packet-gryphon.c,v 1.40 2003/10/03 23:22:12 guy Exp $
* $Id: packet-gryphon.c,v 1.41 2003/10/06 02:01:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -911,13 +911,13 @@ resp_time(tvbuff_t *tvb, int offset, proto_tree *pt)
unsigned int lng[2];
guint64 lnglng;
} ts;
unsigned int timestamp;
time_t timestamp;
unsigned char date[45];
ts.lng[1] = tvb_get_ntohl(tvb, offset);
ts.lng[0] = tvb_get_ntohl(tvb, offset + 4);
timestamp = ts.lnglng / 100000L;
strncpy (date, ctime((time_t*)&timestamp), sizeof(date));
strncpy (date, ctime(&timestamp), sizeof(date));
date[strlen(date)-1] = 0x00;
proto_tree_add_text(pt, tvb, offset, 8, "Date/Time: %s", date);
timestamp = ts.lng[0];