Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Matt Johnston
dropbear
Commits
e4827025
Commit
e4827025
authored
Oct 28, 2015
by
Matt Johnston
Browse files
Warn rather than fail if flags have trailing parts
parent
00798ca8
Changes
2
Hide whitespace changes
Inline
Side-by-side
cli-runopts.c
View file @
e4827025
...
...
@@ -220,8 +220,9 @@ void cli_getopts(int argc, char ** argv) {
/* A flag *waves* */
char
c
=
argv
[
i
][
1
];
if
(
strlen
(
argv
[
i
])
!=
2
)
{
/* Ensure only one flag per hyphen. '?' falls through to print help */
c
=
'?'
;
/* We only handle one flag per hyphen */
fprintf
(
stderr
,
"Warning, trailing '%s' of '%s' is ignored.
\n
"
,
&
argv
[
i
][
2
],
argv
[
i
]);
}
switch
(
c
)
{
case
'y'
:
/* always accept the remote hostkey */
...
...
svr-runopts.c
View file @
e4827025
...
...
@@ -191,8 +191,9 @@ void svr_getopts(int argc, char ** argv) {
if
(
argv
[
i
][
0
]
==
'-'
)
{
char
c
=
argv
[
i
][
1
];
if
(
strlen
(
argv
[
i
])
!=
2
)
{
/* Ensure only one flag per hyphen. '?' falls through to print help */
c
=
'?'
;
/* We only handle one flag per hyphen */
fprintf
(
stderr
,
"Warning, trailing '%s' of '%s' is ignored.
\n
"
,
&
argv
[
i
][
2
],
argv
[
i
]);
}
switch
(
c
)
{
case
'b'
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment