From c25294ad3ba1252a0d77bf63a27758a0eee4259e Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Sun, 9 Apr 2006 22:09:24 +0000 Subject: Another round of cleanups: - Add more warnings. - Rename variables that mask out-scope vars with the same name. - Remove all casts of return values from xmalloc, xrealloc, and alloca. - Remove casts of the first argument to xrealloc. - Convert all bcopy/bzero/bcmp invocations to use memcp/memmove/memset/memcmp. --- remake.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'remake.c') diff --git a/remake.c b/remake.c index 044b49e..363b929 100644 --- a/remake.c +++ b/remake.c @@ -238,7 +238,7 @@ update_goal_chain (struct dep *goals) lastgoal->next = g->next; /* Free the storage. */ - free ((char *) g); + free (g); g = lastgoal == 0 ? goals : lastgoal->next; @@ -1061,7 +1061,7 @@ touch_file (struct file *file) else { struct stat statbuf; - char buf; + char buf = 'x'; int e; EINTRLOOP (e, fstat (fd, &statbuf)); @@ -1191,10 +1191,10 @@ f_mtime (struct file *file, int search) /* free (file->name); */ - name = (char *) xmalloc (arlen + 1 + memlen + 2); - bcopy (arname, name, arlen); + name = xmalloc (arlen + 1 + memlen + 2); + memcpy (name, arname, arlen); name[arlen] = '('; - bcopy (memname, name + arlen + 1, memlen); + memcpy (name + arlen + 1, memname, memlen); name[arlen + 1 + memlen] = ')'; name[arlen + 1 + memlen + 1] = '\0'; -- cgit v1.2.3