File: 0003-Fix-avoid-duplicate-content-when-passing-parameter-h.patch

package info (click to toggle)
davs2 1.6-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 6,300 kB
  • sloc: cpp: 46,477; asm: 33,824; sh: 4,156; ansic: 1,824; makefile: 280
file content (21 lines) | stat: -rw-r--r-- 736 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
From: luofl <falei.luo@gmail.com>
Date: Sun, 11 Apr 2021 15:56:12 +0200
Subject: Fix avoid duplicate content when passing parameter -h or --help

---
 source/test/parse_args.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/source/test/parse_args.h b/source/test/parse_args.h
index f16ad1a..0fbf83b 100644
--- a/source/test/parse_args.h
+++ b/source/test/parse_args.h
@@ -151,7 +151,7 @@ static int parse_args(davs2_input_param_t *p_param, int argc, char **argv)
         case 'h':   /* fall-through is intentional */
         case '?':
             display_usage();
-            break;
+            return -1;
         case 0:     /* long option without a short arg */
             break;
         default: