summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1994-09-10 15:04:57 +0000
committerRoland McGrath <roland@redhat.com>1994-09-10 15:04:57 +0000
commit9f71eaf6b508bf1f819c681232498168b05f3873 (patch)
tree472aaac485f223f0c921ba767b0601bd35d13269
parent03cd08cca2cdbff4fa6ce254eb219376727c8bdb (diff)
downloadgunmake-9f71eaf6b508bf1f819c681232498168b05f3873.tar.gz
Include <assert.h> and use assert instead of printfs and abort.
-rw-r--r--remake.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/remake.c b/remake.c
index b9fe455..e619b44 100644
--- a/remake.c
+++ b/remake.c
@@ -21,6 +21,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "job.h"
#include "dep.h"
#include "file.h"
+#include <assert.h>
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
@@ -277,9 +278,7 @@ update_file (file, depth)
return 0;
default:
- error ("internal error: `%s' command_state == %d in update_file",
- f->name, (int) f->command_state);
- abort ();
+ assert (f->command_state == cs_running);
break;
}
}
@@ -572,13 +571,9 @@ update_file_1 (file, depth)
case 0:
DEBUGPR ("Successfully remade target file `%s'.\n");
break;
- case -1:
- error ("internal error: `%s' update_status is -1 at cs_finished!",
- file->name);
- abort ();
default:
- error ("internal error: `%s' update_status invalid!", file->name);
- abort ();
+ assert (file->update_status == 0 || file->update_status == 1);
+ break;
}
file->updated = 1;