summaryrefslogtreecommitdiff
path: root/src/libsystemd-network
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-05-23 15:57:39 +0200
committerLennart Poettering <lennart@poettering.net>2016-05-26 15:34:42 +0200
commit9c2438b84e1071a841364250f2dec2b15dafceb7 (patch)
treebab6ece757be49794f1f404150d079d4ff9bdc19 /src/libsystemd-network
parent16f0b479cafb745c23efb1a96ccc520fe29e8d7c (diff)
sd-ndisc: properly make various parameters unsigned
Diffstat (limited to 'src/libsystemd-network')
-rw-r--r--src/libsystemd-network/sd-ndisc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libsystemd-network/sd-ndisc.c b/src/libsystemd-network/sd-ndisc.c
index 8d18707de1..bb62cc21a3 100644
--- a/src/libsystemd-network/sd-ndisc.c
+++ b/src/libsystemd-network/sd-ndisc.c
@@ -34,8 +34,8 @@
#include "socket-util.h"
#include "string-util.h"
-#define NDISC_ROUTER_SOLICITATION_INTERVAL 4 * USEC_PER_SEC
-#define NDISC_MAX_ROUTER_SOLICITATIONS 3
+#define NDISC_ROUTER_SOLICITATION_INTERVAL (4U * USEC_PER_SEC)
+#define NDISC_MAX_ROUTER_SOLICITATIONS 3U
enum NDiscState {
NDISC_STATE_IDLE,
@@ -45,9 +45,9 @@ enum NDiscState {
_NDISC_STATE_INVALID = -1,
};
-#define IP6_MIN_MTU (unsigned)1280
+#define IP6_MIN_MTU 1280U
#define ICMP6_RECV_SIZE (IP6_MIN_MTU - sizeof(struct ip6_hdr))
-#define NDISC_OPT_LEN_UNITS 8
+#define NDISC_OPT_LEN_UNITS 8U
#define ND_RA_FLAG_PREF 0x18
#define ND_RA_FLAG_PREF_LOW 0x03
@@ -82,7 +82,7 @@ struct sd_ndisc {
int fd;
sd_event_source *recv;
sd_event_source *timeout;
- int nd_sent;
+ unsigned nd_sent;
sd_ndisc_router_callback_t router_callback;
sd_ndisc_prefix_autonomous_callback_t prefix_autonomous_callback;
sd_ndisc_prefix_onlink_callback_t prefix_onlink_callback;