diff options
author | Tom Gundersen <teg@jklm.no> | 2013-12-06 17:19:55 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2013-12-16 17:28:18 +0100 |
commit | 0fc7531b40225475fed4ca8219b075bbdb54c5e0 (patch) | |
tree | de2493a38fd7ffb7ed24baa0f5ac93ca57914784 /src/libsystemd-rtnl/test-rtnl.c | |
parent | 1f01fb4f29bbe6aff952331a538fb3cc7f52dab4 (diff) |
rtnl: support interleaved reading and writing, and rewind
Diffstat (limited to 'src/libsystemd-rtnl/test-rtnl.c')
-rw-r--r-- | src/libsystemd-rtnl/test-rtnl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsystemd-rtnl/test-rtnl.c b/src/libsystemd-rtnl/test-rtnl.c index bfcfc85d93..d7a243a97e 100644 --- a/src/libsystemd-rtnl/test-rtnl.c +++ b/src/libsystemd-rtnl/test-rtnl.c @@ -42,15 +42,15 @@ static void test_link_configure(sd_rtnl *rtnl, int ifindex) { assert(sd_rtnl_message_append(message, IFLA_ADDRESS, ether_aton(mac)) >= 0); assert(sd_rtnl_message_append(message, IFLA_MTU, &mtu) >= 0); - assert(sd_rtnl_message_read(message, &type, &data) >= 0); + assert(sd_rtnl_message_read(message, &type, &data) > 0); assert(type == IFLA_IFNAME); assert(streq(name, (char *) data)); - assert(sd_rtnl_message_read(message, &type, &data) >= 0); + assert(sd_rtnl_message_read(message, &type, &data) > 0); assert(type == IFLA_ADDRESS); assert(streq(mac, ether_ntoa(data))); - assert(sd_rtnl_message_read(message, &type, &data) >= 0); + assert(sd_rtnl_message_read(message, &type, &data) > 0); assert(type == IFLA_MTU); assert(mtu == *(unsigned int *) data); |