mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-17 16:26:59 +00:00
cppcheck: fix variable scoping
[src/dhcpd-pools.c:68]: (style) The scope of the variable 'c' can be reduced. [src/getdata.c:210]: (style) The scope of the variable 'c' can be reduced. [src/hash.c:102]: (style) The scope of the variable 'l' can be reduced. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
23aae87356
commit
c3e492165c
3 changed files with 5 additions and 3 deletions
|
|
@ -207,7 +207,7 @@ void parse_config(int is_include, const char *restrict config_file,
|
|||
bool newclause = true, comment = false;
|
||||
int quote = 0, braces = 0, argument = ITS_NOTHING_INTERESTING;
|
||||
size_t i = 0;
|
||||
char *word, c;
|
||||
char *word;
|
||||
int braces_shared = 1000;
|
||||
union ipaddr_t addr;
|
||||
struct range_t *range_p;
|
||||
|
|
@ -239,6 +239,7 @@ void parse_config(int is_include, const char *restrict config_file,
|
|||
|
||||
/* Very hairy stuff begins. */
|
||||
while (unlikely(!feof(dhcpd_config))) {
|
||||
char c;
|
||||
c = fgetc(dhcpd_config);
|
||||
/* Certain characters are magical */
|
||||
switch (c) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue