X-Git-Url: http://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fprocess.c;h=153dc67db79f7790fdd03a12cb7ed87a6179ab76;hb=3a316823b971396a428f020f401b9fe41252d98d;hp=5bb7eb3df6da69bdc34c069ec1f9c704642b335e;hpb=5822f817aa802c2c5a83e9d99a8ae78cb822799b;p=tinc diff --git a/src/process.c b/src/process.c index 5bb7eb3d..153dc67d 100644 --- a/src/process.c +++ b/src/process.c @@ -63,22 +63,22 @@ static bool install_service(void) { } HMODULE module = GetModuleHandle(NULL); - GetModuleFileName(module, command + 1, sizeof command - 1); - command[sizeof command - 1] = 0; + GetModuleFileName(module, command + 1, sizeof(command) - 1); + command[sizeof(command) - 1] = 0; - strncat(command, "\"", sizeof command - strlen(command)); + strncat(command, "\"", sizeof(command) - strlen(command)); for(char **argp = g_argv + 1; *argp; argp++) { char *space = strchr(*argp, ' '); - strncat(command, " ", sizeof command - strlen(command)); + strncat(command, " ", sizeof(command) - strlen(command)); if(space) - strncat(command, "\"", sizeof command - strlen(command)); + strncat(command, "\"", sizeof(command) - strlen(command)); - strncat(command, *argp, sizeof command - strlen(command)); + strncat(command, *argp, sizeof(command) - strlen(command)); if(space) - strncat(command, "\"", sizeof command - strlen(command)); + strncat(command, "\"", sizeof(command) - strlen(command)); } service = CreateService(manager, identname, identname,