diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-04-16 01:36:40 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-04-16 01:36:40 +0000 |
commit | d6fcd4a09507eb4b61f2ad4286aee872a8437a7f (patch) | |
tree | c2ec71d67433191ef233d3429e0ddd67e6b88d7b /usr.bin/audioctl/audioctl.c | |
parent | 6e01e13adbe87a539ae7f96f43e90e38bf977fed (diff) |
kill += snprintf
Diffstat (limited to 'usr.bin/audioctl/audioctl.c')
-rw-r--r-- | usr.bin/audioctl/audioctl.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/usr.bin/audioctl/audioctl.c b/usr.bin/audioctl/audioctl.c index e47deb807a6..90d2c1325f3 100644 --- a/usr.bin/audioctl/audioctl.c +++ b/usr.bin/audioctl/audioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: audioctl.c,v 1.8 2002/12/13 16:36:52 naddy Exp $ */ +/* $OpenBSD: audioctl.c,v 1.9 2003/04/16 01:36:39 deraadt Exp $ */ /* $NetBSD: audioctl.c,v 1.14 1998/04/27 16:55:23 augustss Exp $ */ /* @@ -295,15 +295,16 @@ getinfo(int fd) if (ioctl(fd, AUDIO_GETDEV, &adev) < 0) err(1, "AUDIO_GETDEV"); for(;;) { - audio_encoding_t enc; - enc.index = i++; - if (ioctl(fd, AUDIO_GETENC, &enc) < 0) - break; - if (pos) - encbuf[pos++] = ','; - pos += snprintf(encbuf+pos, sizeof(encbuf)-pos, "%s:%d%s", - enc.name, enc.precision, - enc.flags & AUDIO_ENCODINGFLAG_EMULATED ? "*" : ""); + audio_encoding_t enc; + enc.index = i++; + if (ioctl(fd, AUDIO_GETENC, &enc) < 0) + break; + if (pos) + encbuf[pos++] = ','; + snprintf(encbuf+pos, sizeof(encbuf)-pos, "%s:%d%s", + enc.name, enc.precision, + enc.flags & AUDIO_ENCODINGFLAG_EMULATED ? "*" : ""); + pos += strlen(encbuf+pos); } if (ioctl(fd, AUDIO_GETFD, &fullduplex) < 0) err(1, "AUDIO_GETFD"); |