Guard against 'current_directory == NULL' on gdb_abspath (PR gdb/23613)
[deliverable/binutils-gdb.git] / gas / depend.c
index 2dd35a4470c67b0c7011b67a317019607053c3e1..873a47a3de147be125a10c11715b029efd52d53c 100644 (file)
@@ -1,5 +1,5 @@
 /* depend.c - Handle dependency tracking.
-   Copyright (C) 1997-2016 Free Software Foundation, Inc.
+   Copyright (C) 1997-2019 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -67,7 +67,7 @@ register_dependency (const char *filename)
        return;
     }
 
-  dep = (struct dependency *) xmalloc (sizeof (struct dependency));
+  dep = XNEW (struct dependency);
   dep->file = xstrdup (filename);
   dep->next = dep_chain;
   dep_chain = dep;
@@ -121,8 +121,8 @@ quote_string_for_make (FILE *file, const char *src)
          if (file)
            putc (c, file);
          i++;
-         /* Fall through.  This can mishandle things like "$(" but
-            there's no easy fix.  */
+         /* Fall through.  */
+         /* This can mishandle things like "$(" but there's no easy fix.  */
        default:
        ordinary_char:
          /* This can mishandle characters in the string "\0\n%*?[\\~";
This page took 0.023433 seconds and 4 git commands to generate.