X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fprocess.c;h=045c071c02e57ac2372f1b0373a7b7eb396d50cd;hb=0b8b23e0dd7219344543f135ca0aeba8a4a42d48;hp=a3cae338916e2eb6495db6b9102c9de628d28c7b;hpb=ff306f0cdaedb50de1472e7c1fb55de922a6ca60;p=meshlink diff --git a/src/process.c b/src/process.c index a3cae338..045c071c 100644 --- a/src/process.c +++ b/src/process.c @@ -55,8 +55,6 @@ static SERVICE_STATUS_HANDLE statushandle = 0; static bool install_service(void) { char command[4096] = "\""; - char **argp; - bool space; SERVICE_DESCRIPTION description = {"Virtual Private Network daemon"}; manager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); @@ -74,8 +72,8 @@ static bool install_service(void) { strncat(command, "\"", sizeof command - strlen(command)); - for(argp = g_argv + 1; *argp; argp++) { - space = strchr(*argp, ' '); + for(char **argp = g_argv + 1; *argp; argp++) { + char &space = strchr(*argp, ' '); strncat(command, " ", sizeof command - strlen(command)); if(space)