From 209da3f24f662c98595daf2c2a6f16f64cad4690 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Mon, 8 Oct 2007 13:50:18 +0000 Subject: 2007-10-08 Carlos O'Donell * 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. --- binutils/windres.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'binutils/windres.c') diff --git a/binutils/windres.c b/binutils/windres.c index ac643ad59a..a4b466c5a5 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; -- cgit v1.2.1