projects
/
liboping.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9365ae1
)
src/oping.c: Exit early if no host could be resolved.
author
Florian Forster
<ff@octo.it>
Tue, 18 Nov 2014 16:43:11 +0000
(17:43 +0100)
committer
Florian Forster
<ff@octo.it>
Tue, 18 Nov 2014 16:43:11 +0000
(17:43 +0100)
Otherwise "noping" would drop the user into an empty ncurses window,
which is very confusing, annoying and unexpected.
src/oping.c
patch
|
blob
|
history
diff --git
a/src/oping.c
b/src/oping.c
index
1590bfe
..
ca92778
100644
(file)
--- a/
src/oping.c
+++ b/
src/oping.c
@@
-1759,6
+1759,9
@@
int main (int argc, char **argv) /* {{{ */
exit (EXIT_FAILURE);
}
+ if (host_num == 0)
+ exit (EXIT_FAILURE);
+
#if _POSIX_SAVED_IDS
saved_set_uid = (uid_t) -1;
#endif