From: Jim Meyering Date: Thu, 16 Oct 1997 15:03:54 +0000 (+0000) Subject: add assertions X-Git-Tag: TEXTUTILS-1_22c~242 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=acf88c6fa8955ea061f865c2844cb43de6b3510e;p=thirdparty%2Fcoreutils.git add assertions --- diff --git a/src/sort.c b/src/sort.c index 5b4b46808b..54e39b72c0 100644 --- a/src/sort.c +++ b/src/sort.c @@ -541,6 +541,8 @@ strncoll (unsigned char *s1, unsigned char *s2, int len) { register int diff; + assert (len == min (strlen (s1), strlen (s2))); + if (need_locale) { /* Emulate a strncoll function, by forcing strcoll to compare @@ -569,6 +571,7 @@ strncoll_s2_readonly (unsigned char *s1, const unsigned char *s2, int len) { register int diff; + assert (len == strlen (s2)); assert (len <= strlen (s1)); if (need_locale)