reading aid: explicitly check for memcmp() != 0; no functional change
authorop <op@openbsd.org>
Mon, 27 Mar 2023 15:35:29 +0000 (15:35 +0000)
committerop <op@openbsd.org>
Mon, 27 Mar 2023 15:35:29 +0000 (15:35 +0000)
ok ratchov@

usr.bin/aucat/afile.c

index 46b434e..6c17746 100644 (file)
@@ -365,7 +365,7 @@ afile_wav_readhdr(struct afile *f)
        if (!afile_readhdr(f, &riff, sizeof(struct wav_riff)))
                return 0;
        if (memcmp(&riff.id, &wav_id_riff, 4) != 0 ||
-           memcmp(&riff.type, &wav_id_wave, 4)) {
+           memcmp(&riff.type, &wav_id_wave, 4) != 0) {
                log_puts(f->path);
                log_puts(": not a .wav file\n");
                return 0;