chiark / gitweb /
use libudev code, unify logging, pass udev context around everywhere
[elogind.git] / udev / udev_utils_string.c
index 78bfca8..3bfe22c 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';