]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
text-based mount.nfs: Fix po_rightmost() enum return values
authorChuck Lever <chuck.lever@oracle.com>
Thu, 11 Oct 2007 17:55:02 +0000 (13:55 -0400)
committerNeil Brown <neilb@suse.de>
Thu, 11 Oct 2007 23:08:21 +0000 (09:08 +1000)
Neil observed that po_rightmost() now returns enum values from both

enum {
PO_NOT_FOUND = 0,
PO_FOUND = 1,
}

and

enum {
PO_KEY2_RIGHTMOST = 1,
PO_KEY1_RIGHTMOST = -1,
}

It would be cleaner to use a single enum for po_rightmost()'s return value.

We take the next logical step and create specific types for the return
values in order to ensure we don't mix the enum values, and to document
explicitly what return values callers can expect.

This could have been a simpler patch, but I think the end result is a
cleaner overall parser API.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>

No differences found