summaryrefslogtreecommitdiff
path: root/rule.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>1999-07-21 05:53:23 +0000
committerPaul Smith <psmith@gnu.org>1999-07-21 05:53:23 +0000
commit588da9812e055fbceb900c350ab406f97eccbf37 (patch)
treecc291944695d7e922ac93c5ae293289349acd7d5 /rule.c
parent73846549f62b832ca6ff761ad3640a86d3b32c86 (diff)
downloadgunmake-588da9812e055fbceb900c350ab406f97eccbf37.tar.gz
* Add configure option to enable dmalloc library.
* Various code cleanups.
Diffstat (limited to 'rule.c')
-rw-r--r--rule.c4
1 files changed, 2 insertions, 2 deletions
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.