]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
util: add assertions
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 29 May 2019 04:21:43 +0000 (13:21 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 29 May 2019 04:21:51 +0000 (13:21 +0900)
src/basic/parse-util.c

index ae764c581df8490aebbefb3183b7f7ac2f1e894d..7774e794d43af05e1bee0466a0c79c96887583f1 100644 (file)
@@ -84,6 +84,9 @@ int parse_mode(const char *s, mode_t *ret) {
 int parse_ifindex(const char *s, int *ret) {
         int ifi, r;
 
+        assert(s);
+        assert(ret);
+
         r = safe_atoi(s, &ifi);
         if (r < 0)
                 return r;