summaryrefslogtreecommitdiff
path: root/src/tools/oping/oping.c
diff options
context:
space:
mode:
authorSander Vrijders <[email protected]>2018-06-20 18:15:43 +0200
committerDimitri Staessens <[email protected]>2018-06-25 14:51:49 +0200
commitbedee0b0aac97fb195288ec81837e192cbb7b27c (patch)
tree01b3575055e2fc5bb6675e12e22439c24433ce4a /src/tools/oping/oping.c
parent2f997a20b356ecf54db7df2721fd81b2a972003d (diff)
downloadouroboros-bedee0b0aac97fb195288ec81837e192cbb7b27c.tar.gz
ouroboros-bedee0b0aac97fb195288ec81837e192cbb7b27c.zip
tools: Add unidirectional test to operf
This adds a unidirectional test to operf, which is handy for testing unidirectional streams. Signed-off-by: Sander Vrijders <[email protected]> Signed-off-by: Dimitri Staessens <[email protected]>
Diffstat (limited to 'src/tools/oping/oping.c')
-rw-r--r--src/tools/oping/oping.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/tools/oping/oping.c b/src/tools/oping/oping.c
index bc8907e6..c49688b0 100644
--- a/src/tools/oping/oping.c
+++ b/src/tools/oping/oping.c
@@ -135,7 +135,7 @@ static void usage(void)
/* Times are in ms. */
static int time_mul(const char * rem)
{
- if (strcmp (rem, "ms") == 0 || strcmp(rem, "") == 0)
+ if (strcmp(rem, "ms") == 0 || strcmp(rem, "") == 0)
return 1;
else if(strcmp(rem, "s") == 0)
return 1000;
@@ -148,7 +148,6 @@ static int time_mul(const char * rem)
printf("Unknown time unit: %s.\n", rem);
- usage();
exit(EXIT_FAILURE);
}
@@ -244,7 +243,7 @@ int main(int argc,
if (client.s_apn == NULL) {
printf("No server specified.\n");
usage();
- exit(EXIT_SUCCESS);
+ exit(EXIT_FAILURE);
}
if (client.interval > 10000) {
printf("Ping interval truncated to 10s.\n");
@@ -270,5 +269,5 @@ int main(int argc,
fail:
usage();
- exit(EXIT_SUCCESS);
+ exit(EXIT_FAILURE);
}