1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-22 02:35:23 +03:00
aports/community/dhcping/fix-endless-getopt-loop.patch
Petr Fedchenkov 85ecdfba11 community/dhcping: fix endless getopt loop
With char type we cannot get expected -1 from getopt and never go out of
 loop of parsing arguments.

Signed-off-by: Petr Fedchenkov <giggsoff@gmail.com>
2022-07-06 09:20:19 +02:00

26 lines
652 B
Diff

From 27e74baf97c4669e14b8c690044ab979dc34b2ef Mon Sep 17 00:00:00 2001
From: Petr Fedchenkov <giggsoff@gmail.com>
Date: Tue, 28 Jun 2022 10:54:24 +0300
Subject: [PATCH] Fix type to not hit endless getopt loop
Signed-off-by: Petr Fedchenkov <giggsoff@gmail.com>
---
dhcping.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dhcping.c b/dhcping.c
index 7eb5ae6..cdce51c 100644
--- a/dhcping.c
+++ b/dhcping.c
@@ -70,7 +70,7 @@ unsigned char serveridentifier[4];
int maxwait=3;
void doargs(int argc,char **argv) {
- char ch;
+ int ch;
inform=request=verbose=VERBOSE=quiet=0;
ci=gi=server="0.0.0.0";
--
2.34.1