diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2008-12-08 18:41:34 +0100 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2009-01-06 17:16:18 -0200 |
commit | 653f659fe65ae8c2a9fe5b1fdbfc78da43f2cf90 (patch) | |
tree | eaba6b7ba00ee2c1dbea14c8e78dd37fc7fb085e /src/iceauth.c | |
parent | bf138553afe6eecd0e6c218dc6ae4f63065e4196 (diff) |
use memcmp instead of binaryEqual
suggested by Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
http://lists.freedesktop.org/archives/xorg/2008-December/041222.html
Diffstat (limited to 'src/iceauth.c')
-rw-r--r-- | src/iceauth.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/iceauth.c b/src/iceauth.c index 6addcf8..40f1fff 100644 --- a/src/iceauth.c +++ b/src/iceauth.c @@ -38,8 +38,6 @@ Author: Ralph Mor, X Consortium #include <time.h> #define Time_t time_t -static int binaryEqual (const char *a, const char *b, unsigned len); - static int was_called_state; /* @@ -213,7 +211,7 @@ _IcePaMagicCookie1Proc ( IcePaAuthStatus stat; if (authDataLen == length && - binaryEqual ((char *) authData, data, authDataLen)) + memcmp (authData, data, authDataLen) == 0) { stat = IcePaAuthAccepted; } @@ -249,18 +247,3 @@ _IcePaMagicCookie1Proc ( } IcePaAuthProc _IcePaAuthProcs[] = {_IcePaMagicCookie1Proc}; - - -/* - * local routines - */ - -static int -binaryEqual (const char *a, const char *b, unsigned len) - -{ - while (len--) - if (*a++ != *b++) - return 0; - return 1; -} |