chiark / gitweb /
Makefile: remove all the duplicated rules
[elogind.git] / extras / ata_id / ata_id.c
index 2840e914579c4118a0d6941ec91bd1c8522bae9a..9579db310593b5608493efd003808800f7265d8e 100644 (file)
@@ -68,7 +68,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 */