From c7965ea19abf63564bee5b14557885c9dc6c3c57 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sat, 28 Sep 2019 21:59:20 +0200 Subject: [PATCH] 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 --- src/libply/ply-utils.c | 16 ---------------- src/libply/ply-utils.h | 2 -- 2 files changed, 18 deletions(-) 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); -- 2.47.3