From e85966b43ef52027bc2bfac02df978721e77135b Mon Sep 17 00:00:00 2001 From: bouyer Date: Tue, 6 Jun 2000 18:17:07 +0000 Subject: [PATCH] db->seq() returns 0 for success and 1 for failure, not the opposite. walk_db() was silently failing because of this. --- usr.sbin/rpc.statd/statd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/rpc.statd/statd.c b/usr.sbin/rpc.statd/statd.c index 28561e47b6a8..4acc8a63fa9a 100644 --- a/usr.sbin/rpc.statd/statd.c +++ b/usr.sbin/rpc.statd/statd.c @@ -1,4 +1,4 @@ -/* $NetBSD: statd.c,v 1.14 1999/06/10 05:53:51 scottr Exp $ */ +/* $NetBSD: statd.c,v 1.15 2000/06/06 18:17:07 bouyer Exp $ */ /* * Copyright (c) 1997 Christos Zoulas. All rights reserved. @@ -37,7 +37,7 @@ #include #ifndef lint -__RCSID("$NetBSD: statd.c,v 1.14 1999/06/10 05:53:51 scottr Exp $"); +__RCSID("$NetBSD: statd.c,v 1.15 2000/06/06 18:17:07 bouyer Exp $"); #endif /* main() function for status monitor daemon. Some of the code in this */ @@ -362,11 +362,11 @@ walk_db(fun, ptr) switch ((*db->seq)(db, &key, &data, R_NEXT)) { case -1: goto bad; - case 1: + case 0: if (walk_one(fun, &key, &data, ptr) == -1) return -1; break; - case 0: + case 1: return 0; default: abort();