mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-16 15:57:00 +00:00
all: include-what-you-see fixes
After uint32_t fix from 1e82461875
it was good idea to check which headers where needed where. And
generally clean up the includes while doing the check.
This commit is contained in:
parent
d02b684133
commit
26db4eafdc
6 changed files with 20 additions and 18 deletions
|
|
@ -33,7 +33,10 @@
|
|||
* official policies, either expressed or implied, of Sami Kerola.
|
||||
*/
|
||||
|
||||
/* #include <config.h> */
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "dhcpd-pools.h"
|
||||
|
|
|
|||
|
|
@ -33,24 +33,24 @@
|
|||
* official policies, either expressed or implied, of Sami Kerola.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#else /* Not STDC_HEADERS */
|
||||
#else
|
||||
extern char *malloc();
|
||||
#endif /* STDC_HEADERS */
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#else
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <getopt.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "defaults.h"
|
||||
#include "dhcpd-pools.h"
|
||||
|
|
|
|||
|
|
@ -33,9 +33,7 @@
|
|||
* official policies, either expressed or implied, of Sami Kerola.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
|
|
@ -60,14 +58,15 @@ extern char *malloc();
|
|||
#include <features.h>
|
||||
#include <netinet/in.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
#ifndef _XOPEN_SOURCE
|
||||
#define _XOPEN_SOURCE 600
|
||||
#endif
|
||||
|
||||
#include "dhcpd-pools.h"
|
||||
#include "defaults.h"
|
||||
#include "dhcpd-pools.h"
|
||||
|
||||
/* Parse dhcpd.leases file. All performance boosts for this function are
|
||||
* wellcome */
|
||||
|
|
|
|||
16
src/other.c
16
src/other.c
|
|
@ -33,28 +33,28 @@
|
|||
* official policies, either expressed or implied, of Sami Kerola.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "dhcpd-pools.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#else /* Not STDC_HEADERS */
|
||||
#else
|
||||
extern void exit();
|
||||
extern char *malloc();
|
||||
#endif /* STDC_HEADERS */
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#else
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
|
||||
/* Simple memory allocation wrapper */
|
||||
void *safe_malloc(const size_t size)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -33,9 +33,7 @@
|
|||
* official policies, either expressed or implied, of Sami Kerola.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <arpa/inet.h>
|
||||
#include <err.h>
|
||||
|
|
|
|||
|
|
@ -34,8 +34,10 @@
|
|||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue