Skip to content

Commit

Permalink
Remove superfluous includes and follow style(9).
Browse files Browse the repository at this point in the history
ok claudio@ benno@
  • Loading branch information
rwestphal committed Sep 2, 2016
1 parent 1957d82 commit 63c90ce
Show file tree
Hide file tree
Showing 24 changed files with 99 additions and 97 deletions.
5 changes: 2 additions & 3 deletions control.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,16 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/un.h>

#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

#include "eigrpd.h"
#include "eigrp.h"
#include "eigrpe.h"
#include "log.h"
#include "control.h"
#include "log.h"

#define CONTROL_BACKLOG 5

Expand Down
2 changes: 1 addition & 1 deletion control.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#define _CONTROL_H_

#include <sys/queue.h>
#include <sys/time.h>

#include <event.h>

struct {
Expand Down
3 changes: 0 additions & 3 deletions eigrp.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
#ifndef _EIGRP_H_
#define _EIGRP_H_

#include <netinet/in.h>
#include <stddef.h>

/* misc */
#define EIGRP_VERSION 2
#define IPPROTO_EIGRP 88
Expand Down
13 changes: 6 additions & 7 deletions eigrpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,23 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/sysctl.h>
#include <arpa/inet.h>

#include <err.h>
#include <errno.h>
#include <pwd.h>
#include <string.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

#include "eigrpd.h"
#include "eigrp.h"
#include "eigrpe.h"
#include "control.h"
#include "log.h"
#include "rde.h"
#include "log.h"

void main_sig_handler(int, short, void *);
__dead void usage(void);
Expand Down
7 changes: 3 additions & 4 deletions eigrpd.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,14 @@
#define _EIGRPD_H_

#include <sys/queue.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/tree.h>
#include <net/route.h>
#include <sys/socket.h>
#include <net/if.h>
#include <netinet/in.h>
#include <event.h>

#include <event.h>
#include <imsg.h>

#include "eigrp.h"

#define CONF_FILE "/etc/eigrpd.conf"
Expand Down
14 changes: 8 additions & 6 deletions eigrpe.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,23 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#include <stdlib.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netinet/ip.h>

#include <arpa/inet.h>
#include <errno.h>
#include <pwd.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <pwd.h>
#include <unistd.h>
#include <errno.h>

#include "eigrp.h"
#include "eigrpd.h"
#include "eigrpe.h"
#include "rde.h"
#include "control.h"
#include "log.h"
#include "control.h"

void eigrpe_sig_handler(int, short, void *);
__dead void eigrpe_shutdown(void);
Expand Down
8 changes: 4 additions & 4 deletions eigrpe.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
#ifndef _EIGRPE_H_
#define _EIGRPE_H_

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <sys/queue.h>
#include <sys/tree.h>

#include <event.h>

TAILQ_HEAD(ctl_conns, ctl_conn) ctl_conns;

Expand Down
9 changes: 6 additions & 3 deletions hello.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,16 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#include <string.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netinet/ip.h>

#include <arpa/inet.h>
#include <string.h>

#include "eigrpd.h"
#include "eigrp.h"
#include "log.h"
#include "eigrpe.h"
#include "log.h"

/* hello packet handling */

Expand Down
11 changes: 6 additions & 5 deletions interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,19 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#include <stdlib.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <arpa/inet.h>

#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

#include "eigrpd.h"
#include "eigrp.h"
#include "log.h"
#include "eigrpe.h"
#include "log.h"

extern struct eigrpd_conf *econf;

Expand Down
11 changes: 3 additions & 8 deletions kroute.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,16 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/sysctl.h>
#include <sys/tree.h>
#include <sys/uio.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <net/if.h>
#include <net/if_dl.h>
#include <net/if_types.h>
#include <net/route.h>
#include <netinet/in.h>

#include <arpa/inet.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <limits.h>

#include "eigrpd.h"
#include "log.h"
Expand Down
6 changes: 4 additions & 2 deletions log.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,17 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#include <sys/types.h>

#include <arpa/inet.h>
#include <errno.h>
#include <netdb.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <netdb.h>

#include "eigrpd.h"
#include "rde.h"
Expand Down
7 changes: 3 additions & 4 deletions neighbor.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#include <stdlib.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <sys/types.h>

#include <string.h>
#include <stdlib.h>

#include "eigrpd.h"
#include "eigrp.h"
#include "eigrpe.h"
#include "rde.h"
#include "log.h"
Expand Down
13 changes: 8 additions & 5 deletions packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,20 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#include <stdlib.h>
#include <stdio.h>
#include <arpa/inet.h>
#include <sys/types.h>
#include <net/if_dl.h>
#include <netinet/in.h>
#include <netinet/ip.h>

#include <arpa/inet.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "eigrpd.h"
#include "eigrp.h"
#include "log.h"
#include "eigrpe.h"
#include "log.h"

extern struct eigrpd_conf *econf;

Expand Down
9 changes: 3 additions & 6 deletions parse.y
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,17 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <netinet/in.h>
#include <net/route.h>

#include <arpa/inet.h>
#include <ctype.h>
#include <err.h>
#include <errno.h>
#include <unistd.h>
#include <ifaddrs.h>
#include <limits.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <syslog.h>
#include <unistd.h>

#include "eigrp.h"
#include "eigrpd.h"
#include "eigrpe.h"
#include "log.h"
Expand Down
6 changes: 3 additions & 3 deletions printconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#include <stdio.h>
#include <sys/types.h>

#include <arpa/inet.h>
#include <stdio.h>

#include "eigrp.h"
#include "eigrpd.h"
#include "eigrpe.h"
#include "log.h"

void print_mainconf(struct eigrpd_conf *);
Expand Down
8 changes: 5 additions & 3 deletions query.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#include <stdlib.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/ip6.h>

#include <stdlib.h>

#include "eigrpd.h"
#include "eigrp.h"
#include "log.h"
#include "eigrpe.h"
#include "log.h"

extern struct eigrpd_conf *econf;

Expand Down
14 changes: 8 additions & 6 deletions rde.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,21 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#include <stdlib.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <net/route.h>

#include <errno.h>
#include <pwd.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <pwd.h>
#include <unistd.h>

#include "eigrp.h"
#include "eigrpd.h"
#include "eigrpe.h"
#include "log.h"
#include "rde.h"
#include "log.h"

void rde_sig_handler(int sig, short, void *);
__dead void rde_shutdown(void);
Expand Down
6 changes: 2 additions & 4 deletions rde.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@
#ifndef _RDE_H_
#define _RDE_H_

#include <sys/types.h>
#include <sys/time.h>
#include <sys/tree.h>
#include <sys/queue.h>
#include <sys/tree.h>

#include <event.h>
#include <limits.h>

/* just the info RDE needs */
struct rde_nbr {
Expand Down
6 changes: 3 additions & 3 deletions rde_dual.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#include <sys/types.h>

#include <stdlib.h>
#include <string.h>
#include <arpa/inet.h>

#include "eigrp.h"
#include "eigrpd.h"
#include "eigrpe.h"
#include "log.h"
#include "rde.h"
#include "log.h"

void reply_active_timer(int, short, void *);
void reply_active_start_timer(struct reply_node *);
Expand Down
Loading

0 comments on commit 63c90ce

Please sign in to comment.