1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-19 02:10:57 +02:00

maint: prefer minmax.h instead of defining our own

* src/comm.c (min): Remove.
(compare_files): Use MIN which is referenced by system.h.
This commit is contained in:
Collin Funk
2024-03-12 10:48:38 -07:00
committed by Pádraig Brady
parent 9a50494875
commit 00a34a05f5

View File

@@ -36,10 +36,6 @@
proper_name ("Richard M. Stallman"), \
proper_name ("David MacKenzie")
/* Undefine, to avoid warning about redefinition on some systems. */
#undef min
#define min(x, y) ((x) < (y) ? (x) : (y))
/* True if the LC_COLLATE locale is hard. */
static bool hard_LC_COLLATE;
@@ -319,7 +315,7 @@ compare_files (char **infiles)
thisline[1]->buffer, thisline[1]->length - 1);
else
{
size_t len = min (thisline[0]->length, thisline[1]->length) - 1;
size_t len = MIN (thisline[0]->length, thisline[1]->length) - 1;
order = memcmp (thisline[0]->buffer, thisline[1]->buffer, len);
if (order == 0)
order = ((thisline[0]->length > thisline[1]->length)