diff options
author | Serhii Kostiuk <serhii.o.kostiuk@globallogic.com> | 2019-12-16 09:48:38 +0200 |
---|---|---|
committer | Serhii Kostiuk <serhii.o.kostiuk@globallogic.com> | 2019-12-16 11:47:33 +0200 |
commit | 1fe79e42c3403ee873ff5cc2db170b3dfb4acafe (patch) | |
tree | 27dac2df5b3eb57cb80cc5c1cf89a0b3a29142c1 /src | |
parent | 5d0e55f465b750d1379eea934055b8738db8fc8a (diff) | |
download | sms-utils-1fe79e42c3403ee873ff5cc2db170b3dfb4acafe.tar.gz sms-utils-1fe79e42c3403ee873ff5cc2db170b3dfb4acafe.tar.bz2 sms-utils-1fe79e42c3403ee873ff5cc2db170b3dfb4acafe.zip |
[MTX-3102] mPower Feb20: IN:3899 MTCDT-LVW3 fails SMS with GUI
Fixes after a code review:
- Replaced strcmp with strncmp
- fixed the return type for "is_vzw_lte" function
Diffstat (limited to 'src')
-rw-r--r-- | src/atcmd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/atcmd.c b/src/atcmd.c index 4192558..97fd34b 100644 --- a/src/atcmd.c +++ b/src/atcmd.c @@ -1527,7 +1527,7 @@ int sms_device_open(void) return fd; } -is_vzw_lte(void) +int is_vzw_lte(void) { if (!strcmp(Global.core.model, "LE910-NA1")) { log_debug("Found LE910-NA1"); @@ -1538,8 +1538,8 @@ is_vzw_lte(void) } } - return (!strcmp(Global.core.model, "LE910-SVG") || - !strcmp(Global.core.model, "LE910-SV1")); + return (!strncmp(Global.core.model, "LE910-SVG", MODEL_LEN) || + !strncmp(Global.core.model, "LE910-SV1", MODEL_LEN)); } int isCdmaTypeModel() @@ -1548,8 +1548,8 @@ int isCdmaTypeModel() if (is_vzw_lte()) return 1; - return (!strcmp(Global.core.model, "DE910-DUAL") || - !strcmp(Global.core.model, "CE910-DUAL")); + return (!strncmp(Global.core.model, "DE910-DUAL", MODEL_LEN) || + !strncmp(Global.core.model, "CE910-DUAL", MODEL_LEN)); } int is_telit_model() |