summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1997-10-16 15:03:54 +0000
committerJim Meyering <jim@meyering.net>1997-10-16 15:03:54 +0000
commitacf88c6fa8955ea061f865c2844cb43de6b3510e (patch)
treec4a1f1e33f3072d422ebcda0deaad7e8546ab2a7 /src
parent1bcc596ada88ccfbfc7ed9a4d13551418827a3a5 (diff)
downloadcoreutils-acf88c6fa8955ea061f865c2844cb43de6b3510e.tar.xz
add assertions
Diffstat (limited to 'src')
-rw-r--r--src/sort.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sort.c b/src/sort.c
index 5b4b46808..54e39b72c 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)