]> diplodocus.org Git - nmh/blobdiff - sbr/read_switch_multiword_via_readline.c
Fix invalid pointer arithmetic.
[nmh] / sbr / read_switch_multiword_via_readline.c
index 3d6e88184368d2ae79d9b0244122d870c3e6a197..0c099c565240e70b855c72d57bd14fc8f96b7237 100644 (file)
@@ -75,16 +75,12 @@ initialize_readline(void)
 static char **
 nmh_completion(const char *text, int start, int end)
 {
-    char **matches;
-
     NMH_UNUSED (end);
 
-    matches = (char **) NULL;
-
     if (start == 0)
-       matches = rl_completion_matches(text, nmh_command_generator);
+       return rl_completion_matches(text, nmh_command_generator);
 
-    return matches;
+    return NULL;
 }
 
 static char *