From: Kurt Zeilenga Date: Mon, 2 Dec 2002 19:20:57 +0000 (+0000) Subject: language tag fix X-Git-Tag: OPENLDAP_REL_ENG_2_1_9~4 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7069874df489e047ef887a2d519031fb51904597;p=openldap language tag fix --- diff --git a/servers/slapd/ad.c b/servers/slapd/ad.c index 9740fb0fdf..75a55e4769 100644 --- a/servers/slapd/ad.c +++ b/servers/slapd/ad.c @@ -385,8 +385,11 @@ static int is_ad_sublang( subdelimp = strchrlen( subp, ';', &sublen ); if( subdelimp ) subdelimp++; - if ((( suplen < sublen && supp[suplen-1] == '-' ) || - suplen == sublen ) && strncmp( supp, subp, suplen ) == 0 ) + if ( suplen > sublen + ? ( suplen-1 == sublen && supp[suplen-1] == '-' + && strncmp( supp, subp, sublen ) == 0 ) + : ( ( suplen == sublen || supp[suplen-1] == '-' ) + && strncmp( supp, subp, suplen ) == 0 ) ) { goto match; }