From 588da9812e055fbceb900c350ab406f97eccbf37 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Wed, 21 Jul 1999 05:53:23 +0000 Subject: * Add configure option to enable dmalloc library. * Various code cleanups. --- rule.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rule.c') diff --git a/rule.c b/rule.c index b813fa0..b5f690c 100644 --- a/rule.c +++ b/rule.c @@ -423,7 +423,7 @@ install_pattern_rule (p, terminal) r->cmds->fileinfo.lineno = 0; /* These will all be string literals, but we malloc space for them anyway because somebody might want to free them later. */ - r->cmds->commands = savestring (p->commands, strlen (p->commands)); + r->cmds->commands = xstrdup (p->commands); r->cmds->command_lines = 0; } } @@ -599,7 +599,7 @@ lookup_pattern_var (target) stemlen = targlen - p->len + 1; /* Compare the text in the pattern before the stem, if any. */ - if (stem > target && strncmp (p->target, target, stem - target)) + if (stem > target && !strneq (p->target, target, stem - target)) continue; /* Compare the text in the pattern after the stem, if any. -- cgit v1.2.3