Remove perror from ld_assemble, ld_compile and ld_nm
[deliverable/binutils-gdb.git] / libiberty / make-relative-prefix.c
index fa813998be3e97052a5215d1f411586161f64ebc..e3f9f920df4a2b4a8be00e88727d74a42ed46eea 100644 (file)
@@ -1,6 +1,5 @@
 /* Relative (relocatable) prefix support.
-   Copyright (C) 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002, 2006, 2012 Free Software Foundation, Inc.
+   Copyright (C) 1987-2020 Free Software Foundation, Inc.
 
 This file is part of libiberty.
 
@@ -123,6 +122,9 @@ split_directories (const char *name, int *ptr_num_dirs)
   const char *p, *q;
   int ch;
 
+  if (!*name)
+    return NULL;
+
   /* Count the number of directories.  Special case MSDOS disk names as part
      of the initial directory.  */
   p = name;
This page took 0.02517 seconds and 4 git commands to generate.