From 66ce4bae66fa9215200174e2045d2cfaec7c3505 Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Sat, 19 Oct 2019 17:13:47 +1100 Subject: [PATCH] pppd: Avoid declarations within statements in main.c Since we still have old-style function declarations for now, avoid putting declarations within statements, which old compilers didn't accept. Signed-off-by: Paul Mackerras --- pppd/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pppd/main.c b/pppd/main.c index 9e9803a..652240c 100644 --- a/pppd/main.c +++ b/pppd/main.c @@ -737,13 +737,14 @@ void set_ifunit(iskey) int iskey; { + char ifkey[32]; + if (req_ifname[0] != '\0') slprintf(ifname, sizeof(ifname), "%s", req_ifname); else slprintf(ifname, sizeof(ifname), "%s%d", PPP_DRV_NAME, ifunit); info("Using interface %s", ifname); script_setenv("IFNAME", ifname, iskey); - char ifkey[32]; slprintf(ifkey, sizeof(ifkey), "%d", ifunit); script_setenv("UNIT", ifkey, iskey); if (iskey) { -- 2.39.2