MNC 00 is a valid network code and is used by
some operators, see http://en.wikipedia.org/wiki/Mobile_Network_Code.
Remove the test that checks if atoi returns zero.
The string is validated to contain only numbers
already.
Also discussed here:
https://code.google.com/p/android/issues/detail?id=3657
Change-Id: I3220d7980abe4067c9e7aa4cbc10b5fd0b8c9ea7
if (*c != 0) return false;
if (c-val == 0 || c-val > 3) return false;
- int d = atoi(val);
- if (d != 0) {
- if (out) out->mnc = d;
- return true;
+ if (out) {
+ out->mnc = atoi(val);
}
- return false;
+ return true;
}
/*