From 0376f10f6c035e7fa72d59fdf7b92fb4ec4f2c26 Mon Sep 17 00:00:00 2001 From: Michael Shalayeff Date: Thu, 14 Apr 2005 12:42:17 +0000 Subject: make sure round_blocksize does not produce 0 after alignment --- sys/dev/pci/eap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev/pci/eap.c') diff --git a/sys/dev/pci/eap.c b/sys/dev/pci/eap.c index f53a41bec41..5e73a993835 100644 --- a/sys/dev/pci/eap.c +++ b/sys/dev/pci/eap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eap.c,v 1.23 2004/12/17 08:04:45 jsg Exp $ */ +/* $OpenBSD: eap.c,v 1.24 2005/04/14 12:42:16 mickey Exp $ */ /* $NetBSD: eap.c,v 1.46 2001/09/03 15:07:37 reinoud Exp $ */ /* @@ -1051,7 +1051,7 @@ eap_set_params(void *addr, int setmode, int usemode, int eap_round_blocksize(void *addr, int blk) { - return (blk & -32); /* keep good alignment */ + return ((blk + 31) & -32); /* keep good alignment */ } int -- cgit v1.2.3