Print this page
10101 audio tools need smatch fixes
*** 21,30 ****
--- 21,34 ----
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+ /*
+ * Copyright (c) 2018, Joyent, Inc.
+ */
+
/* Command-line audio record utility */
#include <stdio.h>
#include <libgen.h>
#include <errno.h>
*** 771,781 ****
for (cp = s; *cp && (isdigit(*cp) || (*cp == '.')); cp++)
/* NOP */;
if (*cp != NULL) {
if ((*cp == 'k') || (*cp == 'K')) {
drate *= 1000.0;
! } else if ((*cp != 'h') || (*cp != 'H')) {
/* bogus! */
Error(stderr,
MGET("invalid sample rate: %s\n"), s);
return (1);
}
--- 775,785 ----
for (cp = s; *cp && (isdigit(*cp) || (*cp == '.')); cp++)
/* NOP */;
if (*cp != NULL) {
if ((*cp == 'k') || (*cp == 'K')) {
drate *= 1000.0;
! } else if ((*cp != 'h') && (*cp != 'H')) {
/* bogus! */
Error(stderr,
MGET("invalid sample rate: %s\n"), s);
return (1);
}