diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-08-26 23:05:34 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-08-26 23:05:34 +0200 |
commit | e473522841f630bfd25725b06605462e5e30587f (patch) | |
tree | 85ea8fd6127e4cb636ec6a07453bdc147d938b22 /src/libsystemd-network/test-dhcp-option.c | |
parent | 89ca10c6a61309d84d54c5dc5a295387ce39e610 (diff) |
dhcp: generic data should be void*, not uint8_t*
If we handly arbitrary data we should use "void*" pointers, not
"uint8_t*", how go intended C to be used.
Diffstat (limited to 'src/libsystemd-network/test-dhcp-option.c')
-rw-r--r-- | src/libsystemd-network/test-dhcp-option.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsystemd-network/test-dhcp-option.c b/src/libsystemd-network/test-dhcp-option.c index 37f46c8c56..b1ef174849 100644 --- a/src/libsystemd-network/test-dhcp-option.c +++ b/src/libsystemd-network/test-dhcp-option.c @@ -145,7 +145,7 @@ static void test_ignore_opts(uint8_t *descoption, int *descpos, int *desclen) { } } -static int test_options_cb(uint8_t code, uint8_t len, const uint8_t *option, void *userdata) { +static int test_options_cb(uint8_t code, uint8_t len, const void *option, void *userdata) { struct option_desc *desc = userdata; uint8_t *descoption = NULL; int *desclen = NULL, *descpos = NULL; @@ -207,10 +207,10 @@ static int test_options_cb(uint8_t code, uint8_t len, const uint8_t *option, voi for (i = 0; i < len; i++) { if (verbose) - printf("0x%02x(0x%02x) ", option[i], + printf("0x%02x(0x%02x) ", ((uint8_t*) option)[i], descoption[*descpos + 2 + i]); - assert_se(option[i] == descoption[*descpos + 2 + i]); + assert_se(((uint8_t*) option)[i] == descoption[*descpos + 2 + i]); } if (verbose) |