summaryrefslogtreecommitdiffstats
path: root/lib/extra_opts.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/extra_opts.c')
-rw-r--r--lib/extra_opts.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/extra_opts.c b/lib/extra_opts.c
index d46d124..8c17fa4 100644
--- a/lib/extra_opts.c
+++ b/lib/extra_opts.c
@@ -122,7 +122,7 @@ char **np_extra_opts(int *argc, char **argv, const char *plugin_name){
122 if(argv_new==NULL) die(STATE_UNKNOWN, _("malloc() failed!\n")); 122 if(argv_new==NULL) die(STATE_UNKNOWN, _("malloc() failed!\n"));
123 123
124 /* starting with program name */ 124 /* starting with program name */
125 argv_new[0]=strdup(argv[0]); 125 argv_new[0]=argv[0];
126 argc_new=1; 126 argc_new=1;
127 /* then parsed ini opts (frying them up in the same run) */ 127 /* then parsed ini opts (frying them up in the same run) */
128 while(extra_args){ 128 while(extra_args){
@@ -132,7 +132,7 @@ char **np_extra_opts(int *argc, char **argv, const char *plugin_name){
132 free(ea1); 132 free(ea1);
133 } 133 }
134 /* finally the rest of the argv array */ 134 /* finally the rest of the argv array */
135 for (i=1; i<*argc; i++) argv_new[argc_new++]=strdup(argv[i]); 135 for (i=1; i<*argc; i++) argv_new[argc_new++]=argv[i];
136 *argc=argc_new; 136 *argc=argc_new;
137 /* and terminate. */ 137 /* and terminate. */
138 argv_new[argc_new]=NULL; 138 argv_new[argc_new]=NULL;