diff options
author | Gary E. Miller <gem@rellim.com> | 2016-08-15 21:21:46 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2016-08-15 21:21:46 -0700 |
commit | 6692860642f8e359bc9da2603fea9fc7062884fc (patch) | |
tree | ca45922a30ec3a0e2f2428ba3df9925b32332111 /contrib/motosend.c | |
parent | 8f8f6ed4bd33f476df217dc24b08bfa5849450de (diff) | |
download | gpsd-6692860642f8e359bc9da2603fea9fc7062884fc.tar.gz |
bzero() is gone in POSIX 2008. Use memset()
Also two #defines for gpspipe.c
Diffstat (limited to 'contrib/motosend.c')
-rw-r--r-- | contrib/motosend.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/motosend.c b/contrib/motosend.c index a3202dab..bd08b5f4 100644 --- a/contrib/motosend.c +++ b/contrib/motosend.c @@ -88,7 +88,7 @@ int main(int argc, char **argv) { delay.tv_nsec = 1000000L; nanosleep(&delay, NULL); - bzero(buf, BSIZ); + memset(buf, 0, BSIZ); if ((l = read(fd, buf, BSIZ)) == -1) if (!(EINTR == errno || EAGAIN == errno)) err(1, "read"); @@ -126,7 +126,7 @@ static int moto_send(int fd, char *type, char *body ) { if ((buf = malloc(l+7)) == NULL) return -1; - bzero(buf, l+7); + memset(buf, 0, l+7); buf[0] = '@'; buf[1] = '@'; buf[2] = type[0]; buf[3] = type[1]; @@ -179,7 +179,7 @@ int gpsd_hexpack(char *src, char *dst, int len) if ((l < 1) || (l > len)) return -1; - bzero(dst, len); + memset(dst, 0, len); for (i = 0; i < l; i++) { int k; if ((k = hex2bin(src+i*2)) != -1) |