about summary refs log tree commit diff stats
path: root/src/command/cmd_funcs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/command/cmd_funcs.c')
-rw-r--r--src/command/cmd_funcs.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c
index 115db27f..8f463a6c 100644
--- a/src/command/cmd_funcs.c
+++ b/src/command/cmd_funcs.c
@@ -35,8 +35,6 @@
  *
  */
 
-#define _GNU_SOURCE 1
-
 #include "config.h"
 
 #include <string.h>
@@ -141,10 +139,10 @@ cmd_process_input(ProfWin* window, char* inp)
         char* question_mark = strchr(command, '?');
         if (question_mark) {
             *question_mark = '\0';
-            char* fakeinp;
-            if (asprintf(&fakeinp, "/help %s", command + 1)) {
+            gchar* fakeinp = g_strdup_printf("/help %s", command + 1);
+            if (fakeinp) {
                 result = _cmd_execute(window, "/help", fakeinp);
-                free(fakeinp);
+                g_free(fakeinp);
             }
         } else {
             result = _cmd_execute(window, command, inp);