diff options
author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2019-03-20 12:20:04 +0000 |
---|---|---|
committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2019-03-20 12:20:04 +0000 |
commit | 9ffeb12c7a59d34e138b327c449e3165733b2fd6 (patch) | |
tree | 83a2f5f7c14e4d9835ef3240d7877535c1a91c8c | |
parent | aa83f7866d4ccccbf9e96c81fbcdada05e180700 (diff) | |
parent | fefb716a9c60aee35065c9c8fb74b17ccf5ae303 (diff) | |
download | illumos-joyent-9ffeb12c7a59d34e138b327c449e3165733b2fd6.tar.gz |
[illumos-gate merge]
commit fefb716a9c60aee35065c9c8fb74b17ccf5ae303
10101 audio tools need smatch fixes
-rw-r--r-- | usr/src/cmd/audio/audioplay/audioplay.c | 7 | ||||
-rw-r--r-- | usr/src/cmd/audio/audiorecord/audiorecord.c | 6 |
2 files changed, 11 insertions, 2 deletions
diff --git a/usr/src/cmd/audio/audioplay/audioplay.c b/usr/src/cmd/audio/audioplay/audioplay.c index 882c4d9087..ad225bb55e 100644 --- a/usr/src/cmd/audio/audioplay/audioplay.c +++ b/usr/src/cmd/audio/audioplay/audioplay.c @@ -23,6 +23,10 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2018, Joyent, Inc. + */ + /* Command-line audio play utility */ #include <stdio.h> @@ -802,7 +806,8 @@ closeinput:; (void) close(ifd); /* close input file */ if (Errdetect) { cnt = 0; - audio_set_play_error(Audio_fd, (unsigned int *)&cnt); + (void) audio_set_play_error(Audio_fd, + (unsigned int *)&cnt); if (cnt) { Error(stderr, MGET("%s: output underflow in %s\n"), diff --git a/usr/src/cmd/audio/audiorecord/audiorecord.c b/usr/src/cmd/audio/audiorecord/audiorecord.c index 1879f238fa..6195ffe351 100644 --- a/usr/src/cmd/audio/audiorecord/audiorecord.c +++ b/usr/src/cmd/audio/audiorecord/audiorecord.c @@ -23,6 +23,10 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2018, Joyent, Inc. + */ + /* Command-line audio record utility */ #include <stdio.h> @@ -773,7 +777,7 @@ parse_sample_rate(char *s, unsigned *rate) if (*cp != NULL) { if ((*cp == 'k') || (*cp == 'K')) { drate *= 1000.0; - } else if ((*cp != 'h') || (*cp != 'H')) { + } else if ((*cp != 'h') && (*cp != 'H')) { /* bogus! */ Error(stderr, MGET("invalid sample rate: %s\n"), s); |