chiark / gitweb /
Makefile: remove all the duplicated rules
[elogind.git] / extras / usb_id / usb_id.c
index f5ee7959246a8d3a93653497ad0441988915aba7..c4ce0c610365583c3f55635d905a84dbb51e1da8 100644 (file)
@@ -82,7 +82,7 @@ static void set_str(char *to, const char *from, size_t count)
 
        /* strip trailing whitespace */
        len = strnlen(from, count);
-       while (isspace(from[len-1]))
+       while (len && isspace(from[len-1]))
                len--;
 
        /* strip leading whitespace */