chiark / gitweb /
fix more compiler warnings ...
[elogind.git] / extras / volume_id / volume_id / util.c
index a145a8aa2f207c595f2334b9e0f22ec6661fd53f..868d67306cd594a769e26531f21ae204a3749ef7 100644 (file)
@@ -114,12 +114,6 @@ void volume_id_set_label_raw(struct volume_id *id, const uint8_t *buf, size_t co
        id->label_raw_len = count;
 }
 
-static size_t my_strnlen(const char *s, size_t max) {
-    const char *p = s;
-    for (; *p && max--; ++p);
-    return(p - s);
-}
-
 void volume_id_set_label_string(struct volume_id *id, const uint8_t *buf, size_t count)
 {
        unsigned int i;
@@ -127,7 +121,7 @@ void volume_id_set_label_string(struct volume_id *id, const uint8_t *buf, size_t
        memcpy(id->label, buf, count);
 
        /* remove trailing whitespace */
-       i = my_strnlen(id->label, count);
+       i = strnlen(id->label, count);
        while (i--) {
                if (!isspace(id->label[i]))
                        break;