Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/audio/play The test for regular file was wrong.



details:   https://anonhg.NetBSD.org/src/rev/cffdb3ae2a17
branches:  trunk
changeset: 994635:cffdb3ae2a17
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Fri Nov 16 13:55:17 2018 +0000

description:
The test for regular file was wrong.

>From yarl on freenode, thanks!

diffstat:

 usr.bin/audio/play/play.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r e45892336796 -r cffdb3ae2a17 usr.bin/audio/play/play.c
--- a/usr.bin/audio/play/play.c Fri Nov 16 13:02:52 2018 +0000
+++ b/usr.bin/audio/play/play.c Fri Nov 16 13:55:17 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: play.c,v 1.55 2015/08/05 06:54:39 mrg Exp $    */
+/*     $NetBSD: play.c,v 1.56 2018/11/16 13:55:17 mlelstv Exp $        */
 
 /*
  * Copyright (c) 1999, 2000, 2001, 2002, 2010 Matthew R. Green
@@ -28,7 +28,7 @@
 #include <sys/cdefs.h>
 
 #ifndef lint
-__RCSID("$NetBSD: play.c,v 1.55 2015/08/05 06:54:39 mrg Exp $");
+__RCSID("$NetBSD: play.c,v 1.56 2018/11/16 13:55:17 mlelstv Exp $");
 #endif
 
 
@@ -248,7 +248,7 @@
         * or if we failed to mmap the file, try to read it instead, so
         * that filesystems, etc, that do not support mmap() work
         */
-       if (S_ISREG(sb.st_rdev & S_IFMT) == 0 || 
+       if (!S_ISREG(sb.st_mode) || 
            ((off_t)sizet_filesize != filesize) ||
            (oaddr = addr = mmap(0, sizet_filesize, PROT_READ,
            MAP_SHARED, fd, 0)) == MAP_FAILED) {



Home | Main Index | Thread Index | Old Index