summaryrefslogtreecommitdiff
path: root/src/tools/cbr
diff options
context:
space:
mode:
authordimitri staessens <[email protected]>2016-08-04 20:34:56 +0200
committerdimitri staessens <[email protected]>2016-08-04 20:34:56 +0200
commita8c5a9787ba4e8757b16505409c4fbe7d7549e18 (patch)
treeb4717dde188d4648cdddc63fd2260368ee7865ef /src/tools/cbr
parentd5b71449bc18116444720257ba640e3c597ff6e9 (diff)
downloadouroboros-a8c5a9787ba4e8757b16505409c4fbe7d7549e18.tar.gz
ouroboros-a8c5a9787ba4e8757b16505409c4fbe7d7549e18.zip
tools: cbr: Fix missing check on ap_init
If ap_init() fails, the program should exit.
Diffstat (limited to 'src/tools/cbr')
-rw-r--r--src/tools/cbr/cbr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tools/cbr/cbr.c b/src/tools/cbr/cbr.c
index 0cce50db..65783119 100644
--- a/src/tools/cbr/cbr.c
+++ b/src/tools/cbr/cbr.c
@@ -75,8 +75,10 @@ int main(int argc, char ** argv)
bool server = false;
- /* FIXME: should be argv[0] */
- ap_init(argv[0]);
+ if (ap_init(argv[0]) < 0) {
+ printf("Failed to init.\n");
+ exit(EXIT_FAILURE);
+ }
server_settings.interval = 1; /* One second reporting interval */
server_settings.timeout = 1;