From 418317e0bf6020456824f0a6d3c3f4bce3e4b5f3 Mon Sep 17 00:00:00 2001 From: PaulK Date: Fri, 30 Dec 2011 22:10:54 +0100 Subject: Set negative rc for errors, plus cosmetics --- tools/modemctrl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/modemctrl.c b/tools/modemctrl.c index 168c95e..dc7eaaa 100644 --- a/tools/modemctrl.c +++ b/tools/modemctrl.c @@ -396,7 +396,7 @@ int modem_read_loop(struct ipc_client *client) { rc = ipc_client_recv(client, &resp); - if(rc > 0) { + if(rc < 0) { printf("[E] Can't RECV from modem: please run this again\n"); break; } @@ -533,7 +533,7 @@ int main(int argc, char *argv[]) } else if(strncmp(argv[optind], "start", 5) == 0) { printf("[0] Starting modem on FMT client\n"); rc = modem_start(client_fmt); - if(rc > 0) { + if(rc < 0) { printf("[E] Something went wrong\n"); modem_stop(client_fmt); return 1; -- cgit v1.1