summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bootstrap.conf2
-rw-r--r--src/comm.c9
2 files changed, 5 insertions, 6 deletions
diff --git a/bootstrap.conf b/bootstrap.conf
index e61e24101..0747bb858 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -71,7 +71,7 @@ gnulib_modules="
manywarnings
mbrtowc
mbswidth
- memcasecmp mempcpy
+ memcasecmp memcmp2 mempcpy
memrchr mgetgroups
mkancesdirs mkdir mkdir-p mkstemp mktime modechange
mountlist mpsort obstack pathmax perl physmem
diff --git a/src/comm.c b/src/comm.c
index 4ec7e4a07..c60936f4b 100644
--- a/src/comm.c
+++ b/src/comm.c
@@ -1,5 +1,5 @@
/* comm -- compare two sorted files line by line.
- Copyright (C) 86, 90, 91, 1995-2005, 2008 Free Software Foundation, Inc.
+ Copyright (C) 86, 90, 91, 1995-2005, 2008-2009 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -25,6 +25,7 @@
#include "error.h"
#include "quote.h"
#include "stdio--.h"
+#include "memcmp2.h"
#include "xmemcoll.h"
/* The official name of this program (e.g., no `g' prefix). */
@@ -199,10 +200,8 @@ check_order (struct linebuffer const *prev,
order = xmemcoll (prev->buffer, prev->length - 1,
current->buffer, current->length - 1);
else
- {
- size_t len = min (prev->length, current->length) - 1;
- order = memcmp (prev->buffer, current->buffer, len);
- }
+ order = memcmp2 (prev->buffer, prev->length - 1,
+ current->buffer, current->length - 1);
if (0 < order)
{