From: Hans de Goede Date: Sat, 28 Sep 2019 19:59:20 +0000 (+0200) Subject: ply-utils: Drop unused ply_string_has_prefix helper X-Git-Tag: 0.9.5~36^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c7965ea19abf;p=thirdparty%2Fplymouth.git ply-utils: Drop unused ply_string_has_prefix helper ply_string_has_prefix is no longer used anywhere, drop it. Signed-off-by: Hans de Goede --- diff --git a/src/libply/ply-utils.c b/src/libply/ply-utils.c index 22b1db15..f90ac40a 100644 --- a/src/libply/ply-utils.c +++ b/src/libply/ply-utils.c @@ -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) { diff --git a/src/libply/ply-utils.h b/src/libply/ply-utils.h index a936f7a2..d7b76221 100644 --- a/src/libply/ply-utils.h +++ b/src/libply/ply-utils.h @@ -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);