]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Give some context to if_closeraw
authorRoy Marples <roy@marples.name>
Fri, 13 May 2016 15:53:57 +0000 (15:53 +0000)
committerRoy Marples <roy@marples.name>
Fri, 13 May 2016 15:53:57 +0000 (15:53 +0000)
arp.c
dhcp.c
if-bsd.c
if-linux.c
if-sun.c
if.h

diff --git a/arp.c b/arp.c
index 30cc3aeab0060b257758f22226e1fcc170673b19..ab313673fda00619a7241593442061a497ebc005 100644 (file)
--- a/arp.c
+++ b/arp.c
@@ -391,7 +391,7 @@ arp_free(struct arp_state *astate)
                    TAILQ_FIRST(&state->arp_states) == NULL)
                {
                        eloop_event_delete(ifp->ctx->eloop, state->fd);
-                       if_closeraw(state->fd);
+                       if_closeraw(ifp, state->fd);
                        free(state);
                        ifp->if_data[IF_DATA_ARP] = NULL;
                }
diff --git a/dhcp.c b/dhcp.c
index 1ee273e39fd29b7eaff46378b7cfcb2d8129c229..2cd1ac62f0d7900a65d902c61795082f28580541 100644 (file)
--- a/dhcp.c
+++ b/dhcp.c
@@ -1499,7 +1499,7 @@ dhcp_close(struct interface *ifp)
 
        if (state->raw_fd != -1) {
                eloop_event_delete(ifp->ctx->eloop, state->raw_fd);
-               if_closeraw(state->raw_fd);
+               if_closeraw(ifp, state->raw_fd);
                state->raw_fd = -1;
        }
 
index 57e315ff258678f0cdcb998064bf5fcb387a48d9..86215c788cfe6f16114b84cc897e46d516f3f64f 100644 (file)
--- a/if-bsd.c
+++ b/if-bsd.c
@@ -360,7 +360,7 @@ if_findsa(struct dhcpcd_ctx *ctx, const struct sockaddr *sa)
 const char *if_pfname = "Berkley Packet Filter";
 
 void
-if_closeraw(int fd)
+if_closeraw(__unused struct interface *ifp, int fd)
 {
 
        close(fd);
index 2b094a32628ef0b7ecbfd6af23a8387b9dc94453..d3d1ec0c1f7b920cafe8393668ffe6c09d2ce01f 100644 (file)
@@ -1219,7 +1219,7 @@ struct nlmr
 const char *if_pfname = "Packet Socket";
 
 void
-if_closeraw(int fd)
+if_closeraw(__unused struct interface *ifp, int fd)
 {
 
        close(fd);
index f66d8479a16d9a4a996ddb4cfd5a59cc384d8cf5..9ffbf338d7d7747e9c39970cd9092f9fa3836726 100644 (file)
--- a/if-sun.c
+++ b/if-sun.c
@@ -352,9 +352,10 @@ out:
 const char *if_pfname = "SunOS";
 
 void
-if_closeraw(int fd)
+if_closeraw(struct interface *ifp, int fd)
 {
 
+       UNUSED(ifp);
        UNUSED(fd);
 }
 
diff --git a/if.h b/if.h
index 3d997291f9686d85208a6c59faee1141f2ffbdfc..33f05cab896002a1a2a66615b1928de99ec4397f 100644 (file)
--- a/if.h
+++ b/if.h
@@ -143,7 +143,7 @@ int if_openraw(struct interface *, uint16_t);
 ssize_t if_sendraw(const struct interface *, int, uint16_t,
     const void *, size_t);
 ssize_t if_readraw(struct interface *, int, void *, size_t, int *);
-void if_closeraw(int);
+void if_closeraw(struct interface *, int);
 
 int if_address(const struct interface *,
     const struct in_addr *, const struct in_addr *,