diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2005-08-17 18:46:11 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2005-08-17 18:46:11 +0000 |
commit | 62606bbe2abe04d3acc30fd809124b711c9dfe48 (patch) | |
tree | 438e0e7db900297356e41fc0f9da9388245e82f0 /libgps.c | |
parent | 606c667f37b2202517905fab0e585171d4bc76a7 (diff) | |
download | gpsd-62606bbe2abe04d3acc30fd809124b711c9dfe48.tar.gz |
splint cleanup after integrating cgps.
Diffstat (limited to 'libgps.c')
-rw-r--r-- | libgps.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -46,7 +46,7 @@ enum unit gpsd_units(void) { char *envu = NULL; - if ((envu = getenv("GPSD_UNITS")) && *envu) { + if ((envu = getenv("GPSD_UNITS")) != NULL && *envu != NULL) { if (strcasecmp(envu, "imperial")) { return imperial; } @@ -58,11 +58,11 @@ enum unit gpsd_units(void) } /* unrecognized, ignore it */ } - if (((envu = getenv("LC_MEASUREMENT")) && *envu) - || ((envu = getenv("LANG")) && *envu)) { - if ( strstr(envu, "_US") - || strcasecmp(envu, "C") - || strcasecmp(envu, "POSIX")) { + if (((envu = getenv("LC_MEASUREMENT")) != NULL && *envu !=NULL) + || ((envu = getenv("LANG")) != NULL && *envu != NULL)) { + if (strstr(envu, "_US")!=0 + || strcasecmp(envu, "C")!=0 + || strcasecmp(envu, "POSIX")!=0) { return imperial; } /* Other, must be metric */ |