Sync libiberty sources with GCC.
[deliverable/binutils-gdb.git] / libiberty / lrealpath.c
index 4877753cd66fb7bfa99775c4c3d130c478768221..0a19a5e318510265f503d07f852e8f9e13dd9015 100644 (file)
@@ -1,7 +1,7 @@
 /* Libiberty realpath.  Like realpath, but more consistent behavior.
    Based on gdb_realpath from GDB.
 
-   Copyright 2003 Free Software Foundation, Inc.
+   Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
    This file is part of the libiberty library.
 
@@ -17,8 +17,8 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
+   Foundation, Inc., 51 Franklin Street - Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
 
 /*
 
@@ -73,8 +73,7 @@ extern char *canonicalize_file_name (const char *);
 #endif
 
 char *
-lrealpath (filename)
-     const char *filename;
+lrealpath (const char *filename)
 {
   /* Method 1: The system has a compile time upper bound on a filename
      path.  Use that and realpath() to canonicalize the name.  This is
@@ -118,7 +117,7 @@ lrealpath (filename)
       {
        /* PATH_MAX is bounded.  */
        char *buf, *rp, *ret;
-       buf = malloc (path_max);
+       buf = (char *) malloc (path_max);
        if (buf == NULL)
          return NULL;
        rp = realpath (filename, buf);
This page took 0.031915 seconds and 4 git commands to generate.