From 7e8ad81419d8d107ca985cc02673916814531b1a Mon Sep 17 00:00:00 2001 From: John Kohl Date: Mon, 25 Feb 1991 10:21:54 +0000 Subject: use memcmp, not strncmp git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1769 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/princ_comp.c | 12 ++++++------ 1 file 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 * . @@ -16,8 +17,6 @@ static char rcsid_princ_comp_c[] = "$Id$"; #endif /* !lint & !SABER */ -#include - #include #include @@ -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; } -- cgit