projects
/
project
/
odhcpd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c32b27
)
dhcpv4: define val where it is used in dhcpv4_setup_interface()
author
David Härdeman
<
[email protected]
>
Fri, 17 Oct 2025 11:59:37 +0000
(13:59 +0200)
committer
Álvaro Fernández Rojas
<
[email protected]
>
Sun, 23 Nov 2025 19:05:03 +0000
(20:05 +0100)
This makes it a tiny bit easier to see immediately what "val" is.
Signed-off-by: David Härdeman <
[email protected]
>
Link:
https://github.com/openwrt/odhcpd/pull/318
Signed-off-by: Álvaro Fernández Rojas <
[email protected]
>
src/dhcpv4.c
patch
|
blob
|
history
diff --git
a/src/dhcpv4.c
b/src/dhcpv4.c
index 5d49b76a9a3852a0be68dfd2f397aa73659769bc..43ee21c0eb700b7132cca23593fb2329ed15bceb 100644
(file)
--- a/
src/dhcpv4.c
+++ b/
src/dhcpv4.c
@@
-1442,7
+1442,7
@@
bool dhcpv4_setup_interface(struct interface *iface, bool enable)
.sin_port = htons(DHCPV4_SERVER_PORT),
.sin_addr = { INADDR_ANY },
};
- int val
= 1
;
+ int val;
int fd;
if (iface->dhcpv4_event.uloop.fd >= 0) {
@@
-1465,7
+1465,7
@@
bool dhcpv4_setup_interface(struct interface *iface, bool enable)
goto error;
}
- /* Basic IPv4 configuration */
+ val = 1;
if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)) < 0) {
error("setsockopt(SO_REUSEADDR): %m");
goto error;