Skip to content

Commit

Permalink
10101 audio tools need smatch fixes
Browse files Browse the repository at this point in the history
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Gergő Doma <domag02@gmail.com>
Approved by: Dan McDonald <danmcd@joyent.com>
  • Loading branch information
John Levon committed Mar 19, 2019
1 parent 9c2acf0 commit fefb716
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 6 additions & 1 deletion usr/src/cmd/audio/audioplay/audioplay.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
* Use is subject to license terms.
*/

/*
* Copyright (c) 2018, Joyent, Inc.
*/

/* Command-line audio play utility */

#include <stdio.h>
Expand Down Expand Up @@ -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"),
Expand Down
6 changes: 5 additions & 1 deletion usr/src/cmd/audio/audiorecord/audiorecord.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
* Use is subject to license terms.
*/

/*
* Copyright (c) 2018, Joyent, Inc.
*/

/* Command-line audio record utility */

#include <stdio.h>
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit fefb716

Please sign in to comment.