[Dnsmasq-discuss] [PATCH] Chomp file ends

Geert Stappers stappers at stappers.nl
Mon Apr 5 20:42:24 UTC 2021


From: Geert Stappers <stappers at stappers.nl>

Removed empty lines from end of src/*.[ch] files.
If the new last line became '#endif'
was the condition of the '#if' added.
---
 src/arp.c            | 2 --
 src/auth.c           | 3 ---
 src/blockdata.c      | 1 -
 src/bpf.c            | 2 --
 src/cache.c          | 2 --
 src/config.h         | 5 +----
 src/conntrack.c      | 5 +----
 src/dhcp6-protocol.h | 1 -
 src/dhcp6.c          | 4 +---
 src/forward.c        | 5 -----
 src/helper.c         | 5 +----
 src/inotify.c        | 1 -
 src/ip6addr.h        | 1 -
 src/lease.c          | 6 +-----
 src/netlink.c        | 4 +---
 src/network.c        | 5 -----
 src/radv-protocol.h  | 3 ---
 src/rfc2131.c        | 9 +--------
 18 files changed, 7 insertions(+), 57 deletions(-)

diff --git a/src/arp.c b/src/arp.c
index 2503ce4..1e4aad2 100644
--- a/src/arp.c
+++ b/src/arp.c
@@ -230,5 +230,3 @@ int do_arp_script_run(void)
 
   return 0;
 }
-
-
diff --git a/src/auth.c b/src/auth.c
index d0263b1..62cf4e7 100644
--- a/src/auth.c
+++ b/src/auth.c
@@ -867,6 +867,3 @@ size_t answer_auth(struct dns_header *header, char *limit, size_t qlen, time_t n
 }
   
 #endif  
-  
-
-
diff --git a/src/blockdata.c b/src/blockdata.c
index dc81883..f7740b5 100644
--- a/src/blockdata.c
+++ b/src/blockdata.c
@@ -174,4 +174,3 @@ struct blockdata *blockdata_read(int fd, size_t len)
 {
   return blockdata_alloc_real(fd, NULL, len);
 }
-
diff --git a/src/bpf.c b/src/bpf.c
index 82d215a..15c42fc 100644
--- a/src/bpf.c
+++ b/src/bpf.c
@@ -440,5 +440,3 @@ void route_sock(void)
 }
 
 #endif /* HAVE_BSD_NETWORK */
-
-
diff --git a/src/cache.c b/src/cache.c
index 556eb76..7988a3e 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -1980,5 +1980,3 @@ void log_query(unsigned int flags, char *name, union all_addr *addr, char *arg)
   else
     my_syslog(LOG_INFO, "%s %s %s %s", source, name, verb, dest);
 }
-
- 
diff --git a/src/config.h b/src/config.h
index 8c41943..a96cdb5 100644
--- a/src/config.h
+++ b/src/config.h
@@ -447,7 +447,4 @@ static char *compile_opts =
 #endif
 "dumpfile";
 
-#endif
-
-
-
+#endif /* defined(HAVE_DHCP) */
diff --git a/src/conntrack.c b/src/conntrack.c
index 7ec2083..745a2a3 100644
--- a/src/conntrack.c
+++ b/src/conntrack.c
@@ -82,7 +82,4 @@ static int callback(enum nf_conntrack_msg_type type, struct nf_conntrack *ct, vo
   return NFCT_CB_CONTINUE;
 }
 
-#endif
-  
-
-
+#endif /* HAVE_CONNTRACK */
diff --git a/src/dhcp6-protocol.h b/src/dhcp6-protocol.h
index 5277c22..ebe8dfd 100644
--- a/src/dhcp6-protocol.h
+++ b/src/dhcp6-protocol.h
@@ -72,4 +72,3 @@
 #define DHCP6NOBINDING   3
 #define DHCP6NOTONLINK   4
 #define DHCP6USEMULTI    5
-
diff --git a/src/dhcp6.c b/src/dhcp6.c
index 9901e1b..2be877f 100644
--- a/src/dhcp6.c
+++ b/src/dhcp6.c
@@ -825,6 +825,4 @@ void dhcp_construct_contexts(time_t now)
     }
 }
 
-#endif
-
-
+#endif /* HAVE_DHCP6 */
diff --git a/src/forward.c b/src/forward.c
index 2c0ef7f..aff5209 100644
--- a/src/forward.c
+++ b/src/forward.c
@@ -2565,8 +2565,3 @@ static unsigned short get_id(void)
 	return ret;
     }
 }
-
-
-
-
-
diff --git a/src/helper.c b/src/helper.c
index e6d97ce..be3ae52 100644
--- a/src/helper.c
+++ b/src/helper.c
@@ -882,7 +882,4 @@ void helper_write(void)
     }
 }
 
-#endif
-
-
-
+#endif /* HAVE_SCRIPT */
diff --git a/src/inotify.c b/src/inotify.c
index b87798b..5776feb 100644
--- a/src/inotify.c
+++ b/src/inotify.c
@@ -295,4 +295,3 @@ int inotify_check(time_t now)
 }
 
 #endif  /* INOTIFY */
-  
diff --git a/src/ip6addr.h b/src/ip6addr.h
index c00dd08..6388c7d 100644
--- a/src/ip6addr.h
+++ b/src/ip6addr.h
@@ -31,4 +31,3 @@
          && ((__const uint32_t *) (a))[1] == 0                                \
          && ((__const uint32_t *) (a))[2] == 0                                \
          && ((__const uint32_t *) (a))[3] == 0)
-
diff --git a/src/lease.c b/src/lease.c
index 7c5599c..b56647d 100644
--- a/src/lease.c
+++ b/src/lease.c
@@ -1201,8 +1201,4 @@ void lease_add_extradata(struct dhcp_lease *lease, unsigned char *data, unsigned
 }
 #endif
 
-#endif
-	  
-
-      
-
+#endif /* HAVE_DHCP */
diff --git a/src/netlink.c b/src/netlink.c
index 9762bfa..7840ef9 100644
--- a/src/netlink.c
+++ b/src/netlink.c
@@ -402,6 +402,4 @@ static unsigned nl_async(struct nlmsghdr *h, unsigned state)
     }
   return state;
 }
-#endif
-
-      
+#endif /* HAVE_LINUX_NETWORK */
diff --git a/src/network.c b/src/network.c
index 3600250..be35128 100644
--- a/src/network.c
+++ b/src/network.c
@@ -1869,8 +1869,3 @@ void newaddress(time_t now)
     lease_find_interfaces(now);
 #endif
 }
-
-
-
-
-
diff --git a/src/radv-protocol.h b/src/radv-protocol.h
index dccd4e1..8314e8a 100644
--- a/src/radv-protocol.h
+++ b/src/radv-protocol.h
@@ -53,6 +53,3 @@ struct prefix_opt {
 #define ICMP6_OPT_RT_INFO     24
 #define ICMP6_OPT_RDNSS       25
 #define ICMP6_OPT_DNSSL       31
-
-
-
diff --git a/src/rfc2131.c b/src/rfc2131.c
index 3f50755..0baa602 100644
--- a/src/rfc2131.c
+++ b/src/rfc2131.c
@@ -2785,11 +2785,4 @@ static void apply_delay(u32 xid, time_t recvtime, struct dhcp_netid *netid)
     }
 }
 
-#endif
-  
-
-  
-  
-
-
-  
+#endif /* HAVE_DHCP */
-- 
2.30.0




More information about the Dnsmasq-discuss mailing list