summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/main.c b/src/main.c
index e1875fa..af1bc7d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -331,18 +331,8 @@ main (int argc, char *argv[])
print_version ();
break;
case 'c':
- if (!cmd)
- {
- cmd = xmalloc (sizeof(char *));
- cmd_count = 0;
- }
- else
- {
- cmd = xrealloc (cmd, sizeof (char *) * (cmd_count + 1));
- }
-
- cmd[cmd_count] = xstrdup (optarg);
- cmd_count++;
+ cmd = xrealloc (cmd, sizeof (char *) * (cmd_count + 1));
+ cmd[cmd_count++] = xstrdup (optarg);
break;
case 'd':
display = optarg;