git: ed93deba1106 - main - Remove a write-only variable.

John Baldwin jhb at FreeBSD.org
Tue May 11 21:56:51 UTC 2021


The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=ed93deba1106da2cd4755a61612c37bb67edc914

commit ed93deba1106da2cd4755a61612c37bb67edc914
Author:     John Baldwin <jhb at FreeBSD.org>
AuthorDate: 2021-05-11 21:56:23 +0000
Commit:     John Baldwin <jhb at FreeBSD.org>
CommitDate: 2021-05-11 21:56:23 +0000

    Remove a write-only variable.
    
    While refactoring an earlier series of changes during review, the
    'saved_data' variable stopped being used at the bottom of if_ioctl().
    
    Suggested by:   brooks
    Reviewed by:    brooks, imp, kib
    Fixes:          d17e0940f79f Rework compat shims in ifioctl().
    Sponsored by:   DARPA
    Differential Revision:  https://reviews.freebsd.org/D30197
---
 sys/net/if.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sys/net/if.c b/sys/net/if.c
index e444faa54cb0..e18ed3e275ac 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -2901,7 +2901,6 @@ ifioctl(struct socket *so, u_long cmd, caddr_t data, struct thread *td)
 		struct ifgroupreq ifgr;
 		struct ifmediareq ifmr;
 	} thunk;
-	caddr_t saved_data;
 	u_long saved_cmd;
 	struct ifconf32 *ifc32;
 	struct ifdrv32 *ifd32;
@@ -2928,7 +2927,6 @@ ifioctl(struct socket *so, u_long cmd, caddr_t data, struct thread *td)
 
 #ifdef COMPAT_FREEBSD32
 	saved_cmd = cmd;
-	saved_data = data;
 	switch (cmd) {
 	case SIOCGIFCONF32:
 		ifc32 = (struct ifconf32 *)data;


More information about the dev-commits-src-main mailing list