summaryrefslogtreecommitdiff
path: root/pfinet/pfinet-ops.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2011-02-22 01:57:01 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2011-02-22 01:57:01 +0100
commit8fb38008cc0abccdce7b8a971bf0c3f1745655b8 (patch)
tree65a82bc6117efbd661d7f103e5a4455c87ada668 /pfinet/pfinet-ops.c
parent0cbb8c0650eacae336687243904048a0d22233a2 (diff)
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).
Diffstat (limited to 'pfinet/pfinet-ops.c')
-rw-r--r--pfinet/pfinet-ops.c2
1 files changed, 1 insertions, 1 deletions
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;