summaryrefslogtreecommitdiff
path: root/libstore
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2001-12-23 08:12:46 +0000
committerRoland McGrath <roland@gnu.org>2001-12-23 08:12:46 +0000
commitd2285ea6df76ff94611f66bad4588741904b9d61 (patch)
tree94f0995f62d5fb590c5a22846d8afff3aa73c9ee /libstore
parent61730644a170fa83bda5a52feff17eb16c307475 (diff)
2001-12-23 Roland McGrath <roland@frob.com>
* kids.c (store_set_child_flags): Move decrement to avoid ill-defined C behavior that gets a warning. (store_clear_child_flags): Likewise.
Diffstat (limited to 'libstore')
-rw-r--r--libstore/kids.c10
1 files changed, 5 insertions, 5 deletions
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 <miles@gnu.ai.mit.edu>
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;