From 0b0ddaa9a1a4bf51fd95db93900d9b56101a34d1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20H=C3=A4rdeman?= Date: Fri, 3 Oct 2025 12:19:50 +0200 Subject: [PATCH] dhcpv4: rename a variable in dhcpv4_assign() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Rename "buf" to something more descriptive. Signed-off-by: David Härdeman Link: https://github.com/openwrt/odhcpd/pull/264 Signed-off-by: Álvaro Fernández Rojas --- src/dhcpv4.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dhcpv4.c b/src/dhcpv4.c index 0416bae..15425a5 100644 --- a/src/dhcpv4.c +++ b/src/dhcpv4.c @@ -329,7 +329,7 @@ static bool dhcpv4_assign(struct interface *iface, struct dhcp_assignment *a, uint32_t count = end - start + 1; uint32_t seed = 0; bool assigned; - char buf[INET_ADDRSTRLEN]; + char ipv4_str[INET_ADDRSTRLEN]; /* Preconfigured IP address by static lease */ if (a->addr) { @@ -338,7 +338,7 @@ static bool dhcpv4_assign(struct interface *iface, struct dhcp_assignment *a, if (assigned) syslog(LOG_DEBUG, "Assigning static IP: %s", - inet_ntop(AF_INET, &a->addr, buf, sizeof(buf))); + inet_ntop(AF_INET, &a->addr, ipv4_str, sizeof(ipv4_str))); return assigned; } @@ -351,7 +351,7 @@ static bool dhcpv4_assign(struct interface *iface, struct dhcp_assignment *a, if (assigned) { syslog(LOG_DEBUG, "Assigning the IP the client asked for: %s", - inet_ntop(AF_INET, &a->addr, buf, sizeof(buf))); + inet_ntop(AF_INET, &a->addr, ipv4_str, sizeof(ipv4_str))); return true; } } @@ -377,7 +377,7 @@ static bool dhcpv4_assign(struct interface *iface, struct dhcp_assignment *a, if (assigned) { syslog(LOG_DEBUG, "Assigning mapped IP: %s (try %u of %u)", - inet_ntop(AF_INET, &a->addr, buf, sizeof(buf)), + inet_ntop(AF_INET, &a->addr, ipv4_str, sizeof(ipv4_str)), i + 1, count); return true; -- 2.30.2