summaryrefslogtreecommitdiff
path: root/net_ntrip.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-03-29 07:57:18 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-03-29 07:57:18 -0400
commitdb7d7be4c385b0810378db4f5580b5dc8dcfb1ee (patch)
treedab588924b29d7b66800d1b0560f8c3a2c584e6a /net_ntrip.c
parent41160f7fa55bc99a3e7a57a957dcae22f33069cb (diff)
downloadgpsd-db7d7be4c385b0810378db4f5580b5dc8dcfb1ee.tar.gz
scan-build and splint cleanup. All regression tests pass.
Diffstat (limited to 'net_ntrip.c')
-rw-r--r--net_ntrip.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net_ntrip.c b/net_ntrip.c
index 27b1de15..bcdc1dfb 100644
--- a/net_ntrip.c
+++ b/net_ntrip.c
@@ -488,9 +488,10 @@ int ntrip_open(struct gps_device_t *device, char *caster)
(void)strlcpy(device->ntrip.stream.mountpoint,
stream,
sizeof(device->ntrip.stream.mountpoint));
- (void)strlcpy(device->ntrip.stream.credentials,
- auth,
- sizeof(device->ntrip.stream.credentials));
+ if (auth != NULL)
+ (void)strlcpy(device->ntrip.stream.credentials,
+ auth,
+ sizeof(device->ntrip.stream.credentials));
(void)strlcpy(device->ntrip.stream.url,
url,
sizeof(device->ntrip.stream.url));