First convert the string to a number, then convert it to network byte order.
That should squelch some warnings from the compiler on the OS X buildbot. Change-Id: I0da16469fb48e26677c5366d6fe290db2bf52a10 Reviewed-on: https://code.wireshark.org/review/14619 Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
a4aa8930bb
commit
b0db6a01a8
|
@ -227,7 +227,8 @@ static int parse_line(char* packet _U_, unsigned* offset, char* line, int status
|
|||
part = parts;
|
||||
while(*part) {
|
||||
if (strlen(*part) > 1) {
|
||||
value = (guint32)htonl(strtoul(*part, NULL, 16));
|
||||
value = (guint32)strtoul(*part, NULL, 16);
|
||||
value = htonl(value);
|
||||
size = strlen(*part) / 2;
|
||||
memcpy(packet + *offset, &value, size);
|
||||
*offset += (guint32)size;
|
||||
|
|
Loading…
Reference in New Issue