ciscodump: fix OSX compilation error.

Change-Id: I65d0c5bc6178ef3c2a7e9d5cf8e81d985f9d555a
Reviewed-on: https://code.wireshark.org/review/14613
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
This commit is contained in:
Dario Lombardo 2016-03-24 16:40:14 +01:00 committed by Alexis La Goutte
parent 67a5c29474
commit cb08496418
1 changed files with 4 additions and 4 deletions

View File

@ -198,8 +198,8 @@ static int parse_line(char* packet _U_, unsigned* offset, char* line, int status
{
char** parts;
char** part;
int value;
guint64 size;
guint32 value;
size_t size;
if (strlen(line) <= 1) {
if (status == CISCODUMP_PARSER_IN_PACKET)
@ -227,10 +227,10 @@ static int parse_line(char* packet _U_, unsigned* offset, char* line, int status
part = parts;
while(*part) {
if (strlen(*part) > 1) {
value = htonl(strtoul(*part, NULL, 16));
value = (guint32)htonl(strtoul(*part, NULL, 16));
size = strlen(*part) / 2;
memcpy(packet + *offset, &value, size);
*offset += size;
*offset += (guint32)size;
}
part++;
}