mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
Merge from glibc.
(fts_open): Avoid function call in MAX macro use.
This commit is contained in:
1 parent
a2fa57b24c
commit
27ab46340c
1 file changed
+3
-2
@@ -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. */
|
||||
|
||||
Reference in new issue
Block a user