More string and buffer functions.
[apps/madmutt.git] / lib-lib / mapping.c
index c3065ba..4c1e7f0 100644 (file)
@@ -29,9 +29,7 @@
  * please see the file GPL in the top level source directory.
  */
 
-#include <stdlib.h>
-
-#include "mapping.h"
+#include "lib-lib.h"
 
 const char *mutt_getnamebyvalue(int val, const struct mapping_t *map)
 {
@@ -39,7 +37,7 @@ const char *mutt_getnamebyvalue(int val, const struct mapping_t *map)
 
     for (i = 0; map[i].name; i++)
         if (map[i].value == val)
-            return (map[i].name);
+            return map[i].name;
 
     return NULL;
 }
@@ -50,7 +48,7 @@ int mutt_getvaluebyname(const char *name, const struct mapping_t *map)
 
     for (i = 0; map[i].name; i++)
         if (ascii_strcasecmp (map[i].name, name) == 0)
-            return (map[i].value);
+            return map[i].value;
 
     return -1;
 }