summaryrefslogtreecommitdiff
path: root/gpsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'gpsd.c')
-rw-r--r--gpsd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gpsd.c b/gpsd.c
index ed56f14d..b02f208f 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -470,7 +470,7 @@ static int handle_request(int cfd, char *buf, int buflen)
(void)strcpy(phrase, ",A=?");
break;
case 'B': /* change baud rate (SiRF/Zodiac only) */
- if (assign_channel(whoami) && whoami->device->device_type && *p=='=') {
+ if (assign_channel(whoami) && whoami->device->device_type!=NULL && *p=='=') {
i = atoi(++p);
while (isdigit(*p)) p++;
if (whoami->device->device_type->speed_switcher)
@@ -507,7 +507,7 @@ static int handle_request(int cfd, char *buf, int buflen)
(void)strcpy(phrase, ",B=?");
break;
case 'C':
- if (assign_channel(whoami) && whoami->device->device_type)
+ if (assign_channel(whoami) && whoami->device->device_type!=NULL)
(void)snprintf(phrase, sizeof(phrase), ",C=%d",
whoami->device->device_type->cycle);
else
@@ -547,7 +547,7 @@ static int handle_request(int cfd, char *buf, int buflen)
(void)strcpy(phrase, ",F=?");
break;
case 'I':
- if (assign_channel(whoami) && whoami->device->device_type)
+ if (assign_channel(whoami) && whoami->device->device_type!=NULL)
(void)snprintf(phrase, sizeof(phrase), ",I=%s",
whoami->device->device_type->typename);
else