Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/atari/dev use sizeof(buffer) - 1, not sizeof(buffer...
details: https://anonhg.NetBSD.org/src/rev/45386ba43ab5
branches: trunk
changeset: 784359:45386ba43ab5
user: apb <apb%NetBSD.org@localhost>
date: Sat Jan 26 18:13:55 2013 +0000
description:
use sizeof(buffer) - 1, not sizeof(buffer - 1)
diffstat:
sys/arch/atari/dev/clock.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 8eabfeee72ed -r 45386ba43ab5 sys/arch/atari/dev/clock.c
--- a/sys/arch/atari/dev/clock.c Sat Jan 26 17:46:50 2013 +0000
+++ b/sys/arch/atari/dev/clock.c Sat Jan 26 18:13:55 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: clock.c,v 1.54 2012/06/30 12:42:37 tsutsui Exp $ */
+/* $NetBSD: clock.c,v 1.55 2013/01/26 18:13:55 apb Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.54 2012/06/30 12:42:37 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.55 2013/01/26 18:13:55 apb Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -552,7 +552,7 @@
*/
length = uio->uio_resid;
if (uio->uio_offset || (length != sizeof(buffer)
- && length != sizeof(buffer - 1)))
+ && length != sizeof(buffer) - 1))
return EINVAL;
if ((error = uiomove((void *)buffer, sizeof(buffer), uio)))
Home |
Main Index |
Thread Index |
Old Index