Variable is used in one plaice only within a nested statement block.
The code is cleaner if the variable is declared near where it is used.
Found using cppcheck.
Reduce the scope of 'count' variable.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
char nicname[IFNAMSIZ];
struct stat sb;
struct alloted_s *n;
- int count = 0;
char *buf = NULL;
for (n = names; n != NULL; n = n->next)
owner = NULL;
for (n = names; n != NULL; n = n->next) {
+ int count;
+
count = count_entries(buf, sb.st_size, n->name, intype, br);
if (count >= n->allowed)
continue;