chiark / gitweb /
use libudev code, unify logging, pass udev context around everywhere
[elogind.git] / udev / udev_utils_string.c
index 78bfca800c6d5f2fba848e96612b55c1cf5d9be6..3bfe22c8150b5aedcf9355124b140918df5a19bb 100644 (file)
@@ -46,6 +46,8 @@ void remove_trailing_chars(char *path, char c)
 {
        size_t len;
 
+       if (path == NULL)
+               return;
        len = strlen(path);
        while (len > 0 && path[len-1] == c)
                path[--len] = '\0';