remove unnecessary null pointer check
[project/uci.git] / list.c
diff --git a/list.c b/list.c
index 2142b71..0591061 100644 (file)
--- a/list.c
+++ b/list.c
@@ -69,9 +69,6 @@ uci_alloc_generic(struct uci_context *ctx, int type, const char *name, int size)
 static void
 uci_free_element(struct uci_element *e)
 {
-       if (!e)
-               return;
-
        if (!uci_list_empty(&e->list))
                uci_list_del(&e->list);
        free(e);
@@ -215,14 +212,4 @@ found:
        return 0;
 }
 
-static inline char *get_filename(char *path)
-{
-       char *p;
-
-       p = strrchr(path, '/');
-       p++;
-       if (!*p)
-               return NULL;
-       return p;
-}