summaryrefslogtreecommitdiff
path: root/src/udev/udev-rules.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-07-12 16:39:07 +0200
committerLennart Poettering <lennart@poettering.net>2019-07-12 16:40:10 +0200
commit2caa38e99f76788eb5bd84cbdef72c5e3912dd4b (patch)
tree949307e679986ec78f9543bc8dc95961e0c8329a /src/udev/udev-rules.c
parent6fb0569065b56019850a25c2b235d7119bdb0ae6 (diff)
downloadsystemd-2caa38e99f76788eb5bd84cbdef72c5e3912dd4b.tar.gz
systemd-2caa38e99f76788eb5bd84cbdef72c5e3912dd4b.tar.bz2
systemd-2caa38e99f76788eb5bd84cbdef72c5e3912dd4b.zip
tree-wide: some more [static] related fixes
let's add [static] where it was missing so far Drop [static] on parameters that can be NULL. Add an assert() around parameters that have [static] and can't be NULL hence. Add some "const" where it was forgotten.
Diffstat (limited to 'src/udev/udev-rules.c')
-rw-r--r--src/udev/udev-rules.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c
index 303594fa51..e9a6453b6c 100644
--- a/src/udev/udev-rules.c
+++ b/src/udev/udev-rules.c
@@ -1464,6 +1464,8 @@ static int attr_subst_subdir(char attr[static UTIL_PATH_SIZE]) {
const char *tail;
size_t len, size;
+ assert(attr);
+
tail = strstr(attr, "/*/");
if (!tail)
return 0;