[BZ #1960]
authorUlrich Drepper <drepper@redhat.com>
Wed, 21 Dec 2005 08:24:13 +0000 (08:24 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 21 Dec 2005 08:24:13 +0000 (08:24 +0000)
2005-12-21  Ulrich Drepper  <drepper@redhat.com>
[BZ #1960]
* io/fts.c (fts_open): Avoid function call in MAX macro use.

ChangeLog
io/fts.c

index ad9ed77..cb3fdf9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-12-21  Ulrich Drepper  <drepper@redhat.com>
+
+       [BZ #1960]
+       * io/fts.c (fts_open): Avoid function call in MAX macro use.
+
 2005-12-20  Ulrich Drepper  <drepper@redhat.com>
 
        * locale/xlocale.c (_nl_C_locobj): Mark as const.
index f0df56c..bf18299 100644 (file)
--- a/io/fts.c
+++ b/io/fts.c
@@ -120,7 +120,8 @@ fts_open(argv, options, compar)
 #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. */