From 8fb38008cc0abccdce7b8a971bf0c3f1745655b8 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Tue, 22 Feb 2011 01:57:01 +0100 Subject: Fix S_pfinet_siocgifconf given -1 as amount * hurd/pfinet.defs (pfinet_siocgifconf): Document that -1 is used for "all interfaces". * pfinet/pfinet-ops.c (S_pfinet_siocgifconf): Compare amount with `(vm_size_t) -1' instead of '< 0' (which can never happen). --- pfinet/pfinet-ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pfinet/pfinet-ops.c') diff --git a/pfinet/pfinet-ops.c b/pfinet/pfinet-ops.c index a61028ef..8e251020 100644 --- a/pfinet/pfinet-ops.c +++ b/pfinet/pfinet-ops.c @@ -49,7 +49,7 @@ S_pfinet_siocgifconf (io_t port, struct ifconf ifc; __mutex_lock (&global_lock); - if (amount < 0) + if (amount == (vm_size_t) -1) { /* Get the needed buffer length. */ ifc.ifc_buf = NULL; -- cgit v1.2.3