diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-01-05 09:43:51 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-01-10 20:55:04 +0100 |
commit | 17fb3d46ffcf48685943cc9dd4a2e80700f4fa64 (patch) | |
tree | a655db54cd4121dc9acb2e0fca96dcb1943340c0 /openbsc/src/gprs/sgsn_vty.c | |
parent | bb06eb9d7c9c048b5297511b329f0029ecbfd9fc (diff) |
sgsn: Fix VTY command error handling (Coverity)
Currently the result of the osmo_hexparse function in
update_subscr_insert_auth_triplet is not handled correctly. There is
a misplaced leading exclamation mark in a few conditional
expressions. This effectively disables the error checks, as it is
noticed by Coverity ("Missing parentheses" followed by "Logically
dead code").
This patch removes the exclamation marks.
Fixes: Coverity CID 1260435 and CID 1260434
Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/src/gprs/sgsn_vty.c')
-rw-r--r-- | openbsc/src/gprs/sgsn_vty.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/openbsc/src/gprs/sgsn_vty.c b/openbsc/src/gprs/sgsn_vty.c index 9b925a8cb..b15de75c7 100644 --- a/openbsc/src/gprs/sgsn_vty.c +++ b/openbsc/src/gprs/sgsn_vty.c @@ -521,15 +521,15 @@ DEFUN(update_subscr_insert_auth_triplet, update_subscr_insert_auth_triplet_cmd, OSMO_ASSERT(subscr->sgsn_data); - if (!osmo_hexparse(sres_str, &at.sres[0], sizeof(at.sres)) < 0) { + if (osmo_hexparse(sres_str, &at.sres[0], sizeof(at.sres)) < 0) { vty_out(vty, "%% invalid SRES value '%s'\n", sres_str); goto failed; } - if (!osmo_hexparse(rand_str, &at.rand[0], sizeof(at.rand)) < 0) { + if (osmo_hexparse(rand_str, &at.rand[0], sizeof(at.rand)) < 0) { vty_out(vty, "%% invalid RAND value '%s'\n", rand_str); goto failed; } - if (!osmo_hexparse(kc_str, &at.kc[0], sizeof(at.kc)) < 0) { + if (osmo_hexparse(kc_str, &at.kc[0], sizeof(at.kc)) < 0) { vty_out(vty, "%% invalid Kc value '%s'\n", kc_str); goto failed; } |