X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fmount%2Fparse_opt.c;h=1dfee8aafe1b97bad1582361becc64d8dc69eb51;hp=493450859f2235714caaca5391496f8eed85a588;hb=e7ec5e745e851ad10c56d579463ee7e1b85c9c21;hpb=1f0a104ff4aa07141d59cfd1d78157e8ddf7e4ed diff --git a/utils/mount/parse_opt.c b/utils/mount/parse_opt.c index 4934508..1dfee8a 100644 --- a/utils/mount/parse_opt.c +++ b/utils/mount/parse_opt.c @@ -437,9 +437,10 @@ po_found_t po_get_numeric(struct mount_options *options, char *keyword, long *va * as "proto=," "udp" and "tcp." * * Returns the index into @keys of the option that is rightmost. - * If none of the options are present, returns zero. + * If none of the options listed in @keys is present in @options, or + * if @options is NULL, returns -1. */ -unsigned int po_rightmost(struct mount_options *options, const char *keys[]) +int po_rightmost(struct mount_options *options, const char *keys[]) { struct mount_option *option; unsigned int i; @@ -452,7 +453,7 @@ unsigned int po_rightmost(struct mount_options *options, const char *keys[]) } } - return 0; + return -1; } /**