diff --git a/lib/route/classid.c b/lib/route/classid.c index f5a75f07f..0f7021e70 100644 --- a/lib/route/classid.c +++ b/lib/route/classid.c @@ -153,7 +153,8 @@ char *rtnl_tc_handle2str(uint32_t handle, char *buf, size_t len) */ int rtnl_tc_str2handle(const char *str, uint32_t *res) { - char *colon, *end; + const char *colon; + char *colon2, *end; uint32_t h; int err; @@ -172,7 +173,8 @@ int rtnl_tc_str2handle(const char *str, uint32_t *res) return 0; } - h = strtoul(str, &colon, 16); + h = strtoul(str, &colon2, 16); + colon = colon2; /* MAJ is not a number */ if (colon == str) { diff --git a/lib/route/qdisc/netem.c b/lib/route/qdisc/netem.c index 8ced03404..63298b8d7 100644 --- a/lib/route/qdisc/netem.c +++ b/lib/route/qdisc/netem.c @@ -946,7 +946,7 @@ int rtnl_netem_set_delay_distribution(struct rtnl_qdisc *qdisc, const char *dist char name[NAME_MAX]; char dist_suffix[] = ".dist"; _nl_auto_free int16_t *data = NULL; - char *test_suffix; + const char *test_suffix; /* Check several locations for the dist file */ char *test_path[] = {