Check for more errors

This commit is contained in:
Pierre Pronchery 2017-11-09 02:27:42 +01:00
parent fc5ce3b511
commit a27a1640d4

View File

@ -80,9 +80,9 @@ int makefile(Configure * configure, String const * directory, configArray * ca,
FILE * fp = NULL;
int ret = 0;
makefile = string_new(directory);
string_append(&makefile, "/"); /* FIXME check for errors */
string_append(&makefile, MAKEFILE);
if((makefile = string_new_append(directory, "/", MAKEFILE, NULL))
== NULL)
return -1;
if(!(configure->prefs->flags & PREFS_n)
&& (fp = fopen(makefile, "w")) == NULL)
ret = configure_error(makefile, 1);