summaryrefslogtreecommitdiff
path: root/debian/patches/0003-auth-simplify-expression.patch
blob: 97cf5e77658beba29863e271c253fb4205413cc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
From f91191f2643d3c0c1d737e9338bf4224bdc0bdcb Mon Sep 17 00:00:00 2001
From: Justus Winter <4winter@informatik.uni-hamburg.de>
Date: Fri, 2 Jan 2015 21:53:08 +0100
Subject: [PATCH hurd 3/4] auth: simplify expression

* auth/auth.c (S_auth_{user,server}_authenticate): Simplify expression.
---
 auth/auth.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/auth/auth.c b/auth/auth.c
index c36bcb2..a7a188a 100644
--- a/auth/auth.c
+++ b/auth/auth.c
@@ -299,7 +299,7 @@ S_auth_user_authenticate (struct authhandle *userauth,
   if (! userauth)
     return EOPNOTSUPP;
 
-  if (rendezvous == MACH_PORT_NULL || rendezvous == MACH_PORT_DEAD)
+  if (! MACH_PORT_VALID (rendezvous))
     return EINVAL;
 
   u.user = userauth;
@@ -380,7 +380,7 @@ S_auth_server_authenticate (struct authhandle *serverauth,
   if (! serverauth)
     return EOPNOTSUPP;
 
-  if (rendezvous == MACH_PORT_NULL || rendezvous == MACH_PORT_DEAD)
+  if (! MACH_PORT_VALID (rendezvous))
     return EINVAL;
 
   pthread_mutex_lock (&pending_lock);
-- 
2.1.4