Subversion Repositories general

Compare Revisions

Ignore whitespace Rev 1145 → Rev 1146

/rebootdaemon/trunk/rebootdaemon.c
300,6 → 300,8
 
/* skip end spaces */
int len = strlen(line);
if(len == MAX_CONFIG_LINE-1)
return print_config_error(config_name, count, "Line is too long", NULL);
while(len && isspace(line[len-1])) --len;
if(!len) continue;
line[len] = '\0';
311,9 → 313,9
continue;
}
else if(strncmp(line, CONFIG_PORT, min(sizeof(CONFIG_PORT) - 1, len)) == 0) {
subline = line + sizeof(CONFIG_PORT) - 1;
if('=' != subline[0] && !isspace(subline[0]))
return print_config_error(config_name, count, "Unknown config parameter", line);
subline = line + sizeof(CONFIG_PORT) - 1;
while(subline[0] != '\0' && isspace(subline[0])) subline++;
if('=' != subline[0])
return print_config_error(config_name, count, "Equal sign expected", NULL);
327,9 → 329,9
return print_config_error(config_name, count, "End of line expected", NULL);
}
else if(strncmp(line, CONFIG_PASSWORD, min(sizeof(CONFIG_PASSWORD) - 1, len)) == 0) {
subline = line + sizeof(CONFIG_PASSWORD) - 1;
if('=' != subline[0] && !isspace(subline[0]))
return print_config_error(config_name, count, "Unknown config parameter", line);
subline = line + sizeof(CONFIG_PASSWORD) - 1;
while(subline[0] != '\0' && isspace(subline[0])) subline++;
if('=' != subline[0])
return print_config_error(config_name, count, "Equal sign expected", NULL);