]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Merge from glibc.
authorJim Meyering <jim@meyering.net>
Wed, 4 Jan 2006 07:12:22 +0000 (07:12 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 4 Jan 2006 07:12:22 +0000 (07:12 +0000)
(fts_open): Avoid function call in MAX macro use.

lib/fts.c

index d119541efe4615d6fc2181fdbcaf9ccc4ff5ffb9..ed09697e050ae0830b17bbef2bc953a4e431c4cf 100644 (file)
--- a/lib/fts.c
+++ b/lib/fts.c
@@ -1,6 +1,6 @@
 /* Traverse a file hierarchy.
 
-   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005, 2006 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
@@ -241,7 +241,8 @@ fts_open (char * const *argv,
 #ifndef MAXPATHLEN
 # define MAXPATHLEN 1024
 #endif
-       if (! fts_palloc(sp, MAX(fts_maxarglen(argv), MAXPATHLEN)))
+       size_t maxarglen = fts_maxarglen(argv);
+       if (! fts_palloc(sp, MAX(maxarglen, MAXPATHLEN)))
                goto mem1;
 
        /* Allocate/initialize root's parent. */