chiark / gitweb /
path-util: fix path_is_mount_point() for symlinks
[elogind.git] / src / libsystemd-network / test-dhcp-option.c
index 7a0fac8d338a2f19357f07f978c2520272b89e7a..6062a37dabc376631cdb984f8b61e6efd39e730b 100644 (file)
@@ -3,7 +3,6 @@
 #include <stdbool.h>
 #include <errno.h>
 #include <string.h>
-#include <assert.h>
 
 #include "util.h"
 #include "macro.h"
@@ -92,7 +91,7 @@ static void test_message_init(void)
         message = malloc0(len);
 
         assert_se(dhcp_message_init(message, BOOTREQUEST, 0x12345678,
-                  DHCP_DISCOVER, optlen, &optoffset) >= 0);
+                  DHCP_DISCOVER, ARPHRD_ETHER, optlen, &optoffset) >= 0);
 
         assert_se(message->xid == htobe32(0x12345678));
         assert_se(message->op == BOOTREQUEST);
@@ -115,6 +114,7 @@ static DHCPMessage *create_message(uint8_t *options, uint16_t optlen,
         size_t len = sizeof(DHCPMessage) + optlen;
 
         message = malloc0(len);
+        assert_se(message);
 
         if (options && optlen)
                 memcpy(&message->options, options, optlen);
@@ -343,7 +343,7 @@ static void test_option_set(void)
 
         for (i = 0; i < 9; i++) {
                 if (verbose)
-                        printf("%2d: 0x%02x(0x%02x) (options)\n", i, result->options[i],
+                        printf("%2u: 0x%02x(0x%02x) (options)\n", i, result->options[i],
                                options[i]);
                 assert_se(result->options[i] == options[i]);
         }
@@ -362,7 +362,7 @@ static void test_option_set(void)
 
         for (i = 0; i < pos - 8; i++) {
                 if (verbose)
-                        printf("%2d: 0x%02x(0x%02x) (sname)\n", i, result->sname[i],
+                        printf("%2u: 0x%02x(0x%02x) (sname)\n", i, result->sname[i],
                                options[i + 9]);
                 assert_se(result->sname[i] == options[i + 9]);
         }