Commit 7a1caf70 authored by Robert Schmidt's avatar Robert Schmidt

Fixup: strcmp() on correct files

parent 3533b6d3
...@@ -84,13 +84,13 @@ int ue_cqi_set(char *s, int debug, telnet_printfunc_t prnt) { ...@@ -84,13 +84,13 @@ int ue_cqi_set(char *s, int debug, telnet_printfunc_t prnt) {
} }
/* try to convert: if valid number, use it, else if it might be zero, check /* try to convert: if valid number, use it, else if it might be zero, check
* that string was zero, otherwise give -1 (any) */ * that string was zero, otherwise give -1 (any) */
const int ue = atoi(sue) ? atoi(sue) : (strcmp(s, "0") == 0 ? 0 : -1); const int ue = atoi(sue) ? atoi(sue) : (strcmp(sue, "0") == 0 ? 0 : -1);
const char *scqi = strtok(NULL, " "); const char *scqi = strtok(NULL, " ");
if (!scqi) { if (!scqi) {
LOG_E(MAC, "error: could not strtok() CQI part of input!\n"); LOG_E(MAC, "error: could not strtok() CQI part of input!\n");
return -1; return -1;
} }
const int c = atoi(scqi) ? atoi(scqi) : (strcmp(s, "0") == 0 ? 0 : -1); const int c = atoi(scqi) ? atoi(scqi) : (strcmp(scqi, "0") == 0 ? 0 : -1);
if (ue >= 0) if (ue >= 0)
cqi[ue] = c; cqi[ue] = c;
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment