(addext): Use assignment rather than cast, to avoid warnings on some
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 28 May 2003 23:31:00 +0000 (23:31 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 28 May 2003 23:31:00 +0000 (23:31 +0000)
platforms.

lib/addext.c

index 571e3c2db4c643fe80f7c09e37fc6c1f28bee63f..a69c1748de44203132de80609e75fe2b5412a903 100644 (file)
@@ -1,5 +1,7 @@
 /* addext.c -- add an extension to a file name
-   Copyright 1990, 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
+
+   Copyright (C) 1990, 1997, 1998, 1999, 2001, 2003 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
@@ -83,7 +85,11 @@ addext (char *filename, char const *ext, int e)
          *s = c;
        }
       if (0 <= name_max || errno == 0)
-       slen_max = name_max == (size_t) name_max ? name_max : -1;
+       {
+         long size = slen_max = name_max;
+         if (name_max != size)
+           slen_max = -1;
+       }
     }
 #endif