mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-17 08:16:59 +00:00
style: fix few indentation issues
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
b3e02ce0ba
commit
6817d234ca
3 changed files with 17 additions and 16 deletions
|
|
@ -72,7 +72,7 @@ int parse_leases(void)
|
|||
struct stat lease_file_stats;
|
||||
struct macaddr_t *macaddr_p = NULL;
|
||||
int sw_active_lease = 0;
|
||||
struct leases_t * lease;
|
||||
struct leases_t *lease;
|
||||
|
||||
num_touches = num_leases = num_backups = 0;
|
||||
|
||||
|
|
@ -130,20 +130,20 @@ int parse_leases(void)
|
|||
if ((lease = find_lease(htonl(inp.s_addr))) != NULL) {
|
||||
delete_lease(lease);
|
||||
}
|
||||
add_lease(htonl(inp.s_addr),ACTIVE);
|
||||
add_lease(htonl(inp.s_addr), ACTIVE);
|
||||
sw_active_lease = 1;
|
||||
} else if (xstrstr(line, " binding state free", 20)) {
|
||||
/* remove old entry, if exists */
|
||||
if ((lease = find_lease(htonl(inp.s_addr))) != NULL) {
|
||||
delete_lease(lease);
|
||||
}
|
||||
add_lease(htonl(inp.s_addr),FREE);
|
||||
add_lease(htonl(inp.s_addr), FREE);
|
||||
} else if (xstrstr(line, " binding state backup", 22)) {
|
||||
/* remove old entry, if exists */
|
||||
if ((lease = find_lease(htonl(inp.s_addr))) != NULL) {
|
||||
delete_lease(lease);
|
||||
}
|
||||
add_lease(htonl(inp.s_addr),BACKUP);
|
||||
add_lease(htonl(inp.s_addr), BACKUP);
|
||||
}
|
||||
|
||||
if ((macaddr != NULL)
|
||||
|
|
@ -154,7 +154,8 @@ int parse_leases(void)
|
|||
macstring[17] = '\0';
|
||||
macaddr_p->ethernet = safe_strdup(macstring);
|
||||
macaddr_p->ip = safe_strdup(ipstring);
|
||||
macaddr_p->next = safe_malloc(sizeof(struct macaddr_t));
|
||||
macaddr_p->next =
|
||||
safe_malloc(sizeof(struct macaddr_t));
|
||||
macaddr_p = macaddr_p->next;
|
||||
macaddr_p->next = NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ extern void _exit();
|
|||
#endif
|
||||
|
||||
#ifndef HAVE___FPENDING
|
||||
static size_t __fpending(FILE * fp)
|
||||
static size_t __fpending(FILE *fp)
|
||||
{
|
||||
return (fp->_p - fp->_bf._base);
|
||||
}
|
||||
|
|
@ -192,7 +192,7 @@ void clean_up(void)
|
|||
free(shared_networks);
|
||||
}
|
||||
|
||||
int close_stream(FILE * stream)
|
||||
int close_stream(FILE *stream)
|
||||
{
|
||||
const int some_pending = (__fpending(stream) != 0);
|
||||
const int prev_fail = (ferror(stream) != 0);
|
||||
|
|
|
|||
|
|
@ -426,7 +426,7 @@ static void output_long(FILE *restrict f, char const *restrict type,
|
|||
fprintf(f, " <%s class=ralign>%lu</%s>\n", type, unlong, type);
|
||||
}
|
||||
|
||||
static void output_float(FILE * f, char const *restrict type, float fl)
|
||||
static void output_float(FILE *f, char const *restrict type, float fl)
|
||||
{
|
||||
fprintf(f, " <%s class=ralign>%.3f</%s>\n", type, fl, type);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue