osmo-ggsn[master]: sanitize build: ensure uint16/32 alignment in gtpie_test and...

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Mon Nov 20 10:23:03 UTC 2017


Patch Set 1: Code-Review-1

(2 comments)

https://gerrit.osmocom.org/#/c/4915/1/tests/gtp/gtpie_test.c
File tests/gtp/gtpie_test.c:

Line 32: 	memcpy(&u16, &buf[1], sizeof(u16));
why not simply use osmo_load16_be() ? it does the unaligned load without memcpy, another variable declaration and without the need for an ntohs


Line 98: 	memcpy(&u32, &buf[1], sizeof(u32));
osmo_load32be


-- 
To view, visit https://gerrit.osmocom.org/4915
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9eb16450af942d6464211e190f6a4d5a1d814842
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: Yes



More information about the gerrit-log mailing list