bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gnulib] addext.c import from GNU patch 2.5.9


From: Paul Eggert
Subject: [Bug-gnulib] addext.c import from GNU patch 2.5.9
Date: 28 May 2003 16:34:02 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

I merged this change from GNU patch 2.5.9 into gnulib.  Hmm, I now see
that coreutils made a similar change, but I like this version better
as it doesn't have a cast in it.

2003-05-28  Paul Eggert  <address@hidden>

        * addext.c (addext): Use assignment rather than cast, to avoid
        warnings on some platforms.

Index: addext.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/addext.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -p -u -r1.8 -r1.9
--- addext.c    13 Aug 2001 06:30:10 -0000      1.8
+++ addext.c    28 May 2003 23:31:00 -0000      1.9
@@ -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,
          *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
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]