[gnome-packagekit] trivial: Remove unused function



commit 45af54373e6ff633bbb6d770876f2578091af329
Author: Richard Hughes <richard hughsie com>
Date:   Mon Jul 18 14:20:02 2016 +0100

    trivial: Remove unused function

 src/egg-string.c |   27 ---------------------------
 src/egg-string.h |    3 ---
 2 files changed, 0 insertions(+), 30 deletions(-)
---
diff --git a/src/egg-string.c b/src/egg-string.c
index 3fdbe31..032ba17 100644
--- a/src/egg-string.c
+++ b/src/egg-string.c
@@ -64,30 +64,3 @@ egg_strzero (const gchar *text)
                return TRUE;
        return FALSE;
 }
-
-/**
- * egg_strlen:
- * @text: The text to check
- * @len: The maximum length of the string
- *
- * This function is a much safer way of doing strlen as it checks for NULL and
- * a stupidly long string.
- *
- * Return value: the length of the string, or len if the string is too long.
- **/
-guint
-egg_strlen (const gchar *text, guint len)
-{
-       guint i;
-
-       /* common case */
-       if (text == NULL || text[0] == '\0')
-               return 0;
-
-       /* only count up to len */
-       for (i=1; i<len; i++) {
-               if (text[i] == '\0')
-                       break;
-       }
-       return i;
-}
diff --git a/src/egg-string.h b/src/egg-string.h
index 1ef508a..1e11f69 100644
--- a/src/egg-string.h
+++ b/src/egg-string.h
@@ -26,9 +26,6 @@
 
 G_BEGIN_DECLS
 
-guint           egg_strlen                             (const gchar    *text,
-                                                        guint           len)
-                                                        G_GNUC_WARN_UNUSED_RESULT;
 gboolean        egg_strzero                            (const gchar    *text)
                                                         G_GNUC_WARN_UNUSED_RESULT;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]