about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-11-05 09:27:37 +0100
committerMichael Vetter <jubalh@iodoru.org>2020-11-05 09:27:37 +0100
commitc65f03884ed9783a1483ed9da12f660edca91b6d (patch)
tree9633f01c6b85ed35c4d28bdc2439ce140161e080 /src
parent2184e92c19ea1123efacedd665782179e70c8121 (diff)
downloadprofani-tty-c65f03884ed9783a1483ed9da12f660edca91b6d.tar.gz
Simplify cmd_ac_complete_filepath()
Diffstat (limited to 'src')
-rw-r--r--src/command/cmd_ac.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/command/cmd_ac.c b/src/command/cmd_ac.c
index e3777e93..0cc2257b 100644
--- a/src/command/cmd_ac.c
+++ b/src/command/cmd_ac.c
@@ -1531,8 +1531,6 @@ char*
 cmd_ac_complete_filepath(const char* const input, char* const startstr, gboolean previous)
 {
     unsigned int output_off = 0;
-
-    char* result = NULL;
     char* tmp;
 
     // strip command
@@ -1631,12 +1629,7 @@ cmd_ac_complete_filepath(const char* const input, char* const startstr, gboolean
     autocomplete_update(filepath_ac, (char**)files->data);
     g_array_free(files, TRUE);
 
-    result = autocomplete_param_with_ac(input, startstr, filepath_ac, TRUE, previous);
-    if (result) {
-        return result;
-    }
-
-    return NULL;
+    return autocomplete_param_with_ac(input, startstr, filepath_ac, TRUE, previous);
 }
 
 static char*