aboutsummaryrefslogtreecommitdiff
path: root/binutils/windres.c
diff options
context:
space:
mode:
authorCarlos O'Donell <carlos@codesourcery.com>2007-10-08 13:50:18 +0000
committerCarlos O'Donell <carlos@codesourcery.com>2007-10-08 13:50:18 +0000
commitc7f0a8e098119312e57c77969a0c6646abfd2040 (patch)
treed7755aeb4d8a12a760dde577e4aa78eeb40cf0a5 /binutils/windres.c
parent313628ccbab4a2f66be351ba65a0734e75e3448f (diff)
downloadgdb-c7f0a8e098119312e57c77969a0c6646abfd2040.zip
gdb-c7f0a8e098119312e57c77969a0c6646abfd2040.tar.gz
gdb-c7f0a8e098119312e57c77969a0c6646abfd2040.tar.bz2
2007-10-08 Carlos O'Donell <carlos@codesourcery.com>
* resrc.c (read_rc_file): Rename e to edit, and c to dir. Pass dir to windres_add_include_dir. Add comments. (close_input_stream): Check pclose error, and call fatal if the preprocessor failed. * windres.c (windres_add_include_dir): Assert that p is non-NULL, and not an empty string.
Diffstat (limited to 'binutils/windres.c')
-rw-r--r--binutils/windres.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/binutils/windres.c b/binutils/windres.c
index ac643ad..a4b466c 100644
--- a/binutils/windres.c
+++ b/binutils/windres.c
@@ -765,6 +765,12 @@ windres_add_include_dir (const char *p)
{
struct include_dir *n, **pp;
+ /* Computing paths is often complicated and error prone.
+ The easiest way to check for mistakes is at the time
+ we add them to include_dirs. */
+ assert (p != NULL);
+ assert (*p != '\0');
+
n = xmalloc (sizeof *n);
n->next = NULL;
n->dir = (char * ) p;