mirror of
https://github.com/mborgerding/kissfft.git
synced 2026-08-30 13:57:04 -04:00
Fix Medium Coverity finding:
CWE-369 (Division or modulo by float zero) (https://cwe.mitre.org/data/definitions/369.html)
This commit is contained in:
+7
-1
@@ -85,7 +85,13 @@ double two_tone_test( int nfft, int bin1,int bin2)
|
||||
int main(int argc,char ** argv)
|
||||
{
|
||||
int nfft = 4*2*2*3*5;
|
||||
if (argc>1) nfft = atoi(argv[1]);
|
||||
if (argc>1) {
|
||||
nfft = atoi(argv[1]);
|
||||
if (nfft <= 0) {
|
||||
fprintf(stderr,"Error: nfft must be a positive integer\n");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
int i,j;
|
||||
double minsnr = 500;
|
||||
|
||||
Reference in New Issue
Block a user