clean up some bad, bad formatting
This commit is contained in:
@ -81,13 +81,15 @@ static int read_opt(const char *const_line, void *arg)
|
|||||||
u_int32_t result_u32;
|
u_int32_t result_u32;
|
||||||
void *valptr;
|
void *valptr;
|
||||||
|
|
||||||
if ((opt = strtok(strcpy(line, const_line), " \t="))) {
|
if (!(opt = strtok(strcpy(line, const_line), " \t="))) return 0;
|
||||||
|
|
||||||
for (option = dhcp_options; option->code; option++)
|
for (option = dhcp_options; option->code; option++)
|
||||||
if (!strcasecmp(option->name, opt))
|
if (!strcasecmp(option->name, opt))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (option->code) do {
|
if (!option->code) return 0;
|
||||||
|
|
||||||
|
do {
|
||||||
val = strtok(NULL, ", \t");
|
val = strtok(NULL, ", \t");
|
||||||
if(!val)
|
if(!val)
|
||||||
break;
|
break;
|
||||||
@ -138,7 +140,7 @@ static int read_opt(const char *const_line, void *arg)
|
|||||||
retval = 0;
|
retval = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(valptr) {
|
if (valptr) {
|
||||||
memcpy(buffer, valptr, length);
|
memcpy(buffer, valptr, length);
|
||||||
retval = (endptr[0] == '\0');
|
retval = (endptr[0] == '\0');
|
||||||
}
|
}
|
||||||
@ -147,7 +149,6 @@ static int read_opt(const char *const_line, void *arg)
|
|||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
} while (option->flags & OPTION_LIST);
|
} while (option->flags & OPTION_LIST);
|
||||||
}
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user