From d2285ea6df76ff94611f66bad4588741904b9d61 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 23 Dec 2001 08:12:46 +0000 Subject: 2001-12-23 Roland McGrath * kids.c (store_set_child_flags): Move decrement to avoid ill-defined C behavior that gets a warning. (store_clear_child_flags): Likewise. --- libstore/kids.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libstore/kids.c') diff --git a/libstore/kids.c b/libstore/kids.c index ee00ace4..1b9fa367 100644 --- a/libstore/kids.c +++ b/libstore/kids.c @@ -1,6 +1,6 @@ /* Managing sub-stores - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 2001 Free Software Foundation, Inc. Written by Miles Bader This file is part of the GNU Hurd. @@ -118,8 +118,8 @@ store_set_child_flags (struct store *store, int flags) } if (err) - while (i > 0) - store_clear_flags (store->children[--i], flags & ~old_child_flags[i]); + while (i-- > 0) + store_clear_flags (store->children[i], flags & ~old_child_flags[i]); else store->flags |= flags; @@ -142,8 +142,8 @@ store_clear_child_flags (struct store *store, int flags) } if (err) - while (i > 0) - store_set_flags (store->children[--i], flags & ~old_child_flags[i]); + while (i-- > 0) + store_set_flags (store->children[i], flags & ~old_child_flags[i]); else store->flags &= ~flags; -- cgit v1.2.3