C99 extravaganza.

This commit is contained in:
Guus Sliepen 2012-10-08 00:35:38 +02:00
parent ff306f0cda
commit 0b8b23e0dd
24 changed files with 131 additions and 328 deletions

View file

@ -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)