Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/usr.bin/audio/record
Am 21.09.2011 um 16:32 schrieb Christos Zoulas:
> Module Name: src
> Committed By: christos
> Date: Wed Sep 21 14:32:14 UTC 2011
>
> Modified Files:
> src/usr.bin/audio/record: record.c
>
> Log Message:
> PR/45384: Henning Petersen: Swapped arguments in lseek
>
>
> To generate a diff of this commit:
> cvs rdiff -u -r1.51 -r1.52 src/usr.bin/audio/record/record.c
>
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
>
> Modified files:
>
> Index: src/usr.bin/audio/record/record.c
> diff -u src/usr.bin/audio/record/record.c:1.51
> src/usr.bin/audio/record/record.c:1.52
> --- src/usr.bin/audio/record/record.c:1.51 Sat Aug 27 21:17:48 2011
> +++ src/usr.bin/audio/record/record.c Wed Sep 21 10:32:14 2011
> @@ -1,4 +1,4 @@
> -/* $NetBSD: record.c,v 1.51 2011/08/28 01:17:48 joerg Exp $ */
> +/* $NetBSD: record.c,v 1.52 2011/09/21 14:32:14 christos Exp $ */
>
> /*
> * Copyright (c) 1999, 2002, 2003, 2005, 2010 Matthew R. Green
> @@ -32,7 +32,7 @@
> #include <sys/cdefs.h>
>
> #ifndef lint
> -__RCSID("$NetBSD: record.c,v 1.51 2011/08/28 01:17:48 joerg Exp $");
> +__RCSID("$NetBSD: record.c,v 1.52 2011/09/21 14:32:14 christos Exp $");
> #endif
>
>
> @@ -755,7 +755,7 @@
> if (outfd == STDOUT_FILENO)
> return;
>
> - if (lseek(outfd, SEEK_SET, 0) < 0)
> + if (lseek(outfd, (off_t)0, SEEK_SET) == (off_t)-1)
> err(1, "could not seek to start of file for header rewrite");
Fwiw, this never caused a problem since SEEK_SET is defined 0. But why is an
explicit typecast to off_t needed? Aren't integer cast automatically?
write_header();
>
> }
>
Freundliche Grüsse,
micro systems
Marc Balmer
--
Marc Balmer
micro systems, Wiesendamm 2a, Postfach, 4019 Basel
fon +41 61 383 05 10, fax +41 61 383 05 12, http://www.msys.ch/
Home |
Main Index |
Thread Index |
Old Index