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 define: datasize == 0 means use the whole...
details: https://anonhg.NetBSD.org/src/rev/36489c0af7e7
branches: trunk
changeset: 522007:36489c0af7e7
user: mrg <mrg%NetBSD.org@localhost>
date: Sun Feb 10 13:15:08 2002 +0000
description:
define: datasize == 0 means use the whole file. fixes part of PR#12809.
diffstat:
usr.bin/audio/play/play.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r d12ccaf2d778 -r 36489c0af7e7 usr.bin/audio/play/play.c
--- a/usr.bin/audio/play/play.c Sun Feb 10 12:26:23 2002 +0000
+++ b/usr.bin/audio/play/play.c Sun Feb 10 13:15:08 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: play.c,v 1.35 2002/02/05 00:17:26 augustss Exp $ */
+/* $NetBSD: play.c,v 1.36 2002/02/10 13:15:08 mrg Exp $ */
/*
* Copyright (c) 1999 Matthew R. Green
@@ -211,7 +211,7 @@
struct stat sb;
void *addr, *oaddr;
off_t filesize;
- size_t datasize;
+ size_t datasize = 0;
ssize_t hdrlen;
int fd;
@@ -268,7 +268,8 @@
filesize -= hdrlen;
addr = (char *)addr + hdrlen;
if (filesize < datasize || datasize == 0) {
- warnx("bogus datasize: %lu", (long)datasize);
+ if (filesize < datasize)
+ warnx("bogus datasize: %ld", (u_long)datasize);
datasize = filesize;
}
Home |
Main Index |
Thread Index |
Old Index