summaryrefslogtreecommitdiff
path: root/remake.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2006-04-09 22:09:24 +0000
committerPaul Smith <psmith@gnu.org>2006-04-09 22:09:24 +0000
commit8b40defd1e1e486fd04d87c4b1a5ce233f145413 (patch)
tree3a3bed68bb3377d1a2a28ef8e1a56a269bc7b675 /remake.c
parent21a5b2c58dc9198560f81895c24abd9b62aa058c (diff)
downloadmake-8b40defd1e1e486fd04d87c4b1a5ce233f145413.tar.gz
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.
Diffstat (limited to 'remake.c')
-rw-r--r--remake.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/remake.c b/remake.c
index 044b49e9..363b9290 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';