diff options
Diffstat (limited to 'gpsd.c')
-rw-r--r-- | gpsd.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |