diff options
author | John Kohl <jtkohl@mit.edu> | 1991-02-25 10:21:54 +0000 |
---|---|---|
committer | John Kohl <jtkohl@mit.edu> | 1991-02-25 10:21:54 +0000 |
commit | 7e8ad81419d8d107ca985cc02673916814531b1a (patch) | |
tree | b3a2c448d10c5f46fa1ea8a17eb2ec0547e280f0 | |
parent | 6d21d22133595c4d3329092721c2003ea75781ea (diff) | |
download | krb5-7e8ad81419d8d107ca985cc02673916814531b1a.tar.gz krb5-7e8ad81419d8d107ca985cc02673916814531b1a.tar.xz krb5-7e8ad81419d8d107ca985cc02673916814531b1a.zip |
use memcmp, not strncmp
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1769 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r-- | src/lib/krb5/krb/princ_comp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/krb5/krb/princ_comp.c b/src/lib/krb5/krb/princ_comp.c index 2cd0470e58..57787d7f09 100644 --- a/src/lib/krb5/krb/princ_comp.c +++ b/src/lib/krb5/krb/princ_comp.c @@ -2,7 +2,8 @@ * $Source$ * $Author$ * - * Copyright 1990 by the Massachusetts Institute of Technology. + * Copyright 1990,1991 by the Massachusetts Institute of Technology. + * All Rights Reserved. * * For copying and distribution information, please see the file * <krb5/copyright.h>. @@ -16,8 +17,6 @@ static char rcsid_princ_comp_c[] = "$Id$"; #endif /* !lint & !SABER */ -#include <krb5/copyright.h> - #include <krb5/krb5.h> #include <krb5/ext-proto.h> @@ -33,10 +32,11 @@ krb5_const_principal princ2; register krb5_data * const *p1, * const *p2; for (p1 = princ1, p2 = princ2; *p1 && *p2; p1++, p2++) - if (strncmp((*p1)->data, (*p2)->data, min((*p1)->length, - (*p2)->length))) + if (memcmp((*p1)->data, (*p2)->data, min((*p1)->length, + (*p2)->length))) return FALSE; - if (*p1 || *p2) /* didn't both run out at once */ + if (*p1 || *p2) /* didn't both run out of components + at once */ return FALSE; return TRUE; } |