]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
ply-utils: Drop unused ply_string_has_prefix helper
authorHans de Goede <hdegoede@redhat.com>
Sat, 28 Sep 2019 19:59:20 +0000 (21:59 +0200)
committerHans de Goede <hdegoede@redhat.com>
Mon, 30 Sep 2019 09:15:31 +0000 (11:15 +0200)
ply_string_has_prefix is no longer used anywhere, drop it.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
src/libply/ply-utils.c
src/libply/ply-utils.h

index 22b1db1518dccfe064f33bbde1a1ab4565be891b..f90ac40a1ac9c660a58331699b786a5089fc9880 100644 (file)
@@ -459,22 +459,6 @@ ply_free_string_array (char **array)
         free (array);
 }
 
-bool
-ply_string_has_prefix (const char *string,
-                       const char *prefix)
-{
-        if (string == NULL)
-                return false;
-
-        if (prefix == NULL)
-                return false;
-
-        if (strlen (prefix) > strlen (string))
-                return false;
-
-        return strncmp (string, prefix, strlen (prefix)) == 0;
-}
-
 double
 ply_get_timestamp (void)
 {
index a936f7a20d45a1cfb912beba7bea03b34871ad54..d7b76221a0781222831304daebfd797eb1addc78 100644 (file)
@@ -83,8 +83,6 @@ bool ply_fd_has_data (int fd);
 bool ply_set_fd_as_blocking (int fd);
 char **ply_copy_string_array (const char *const *array);
 void ply_free_string_array (char **array);
-bool ply_string_has_prefix (const char *string,
-                            const char *prefix);
 double ply_get_timestamp (void);
 
 void ply_save_errno (void);