bsdgrep: Use grep_strdup instead of grep_malloc+strcpy
This commit is contained in:
parent
e73154c1d7
commit
66ab298323
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=332858
@ -323,8 +323,7 @@ procfile(const char *fn)
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
pc.ln.file = grep_malloc(strlen(fn) + 1);
|
pc.ln.file = grep_strdup(fn);
|
||||||
strcpy(pc.ln.file, fn);
|
|
||||||
pc.ln.line_no = 0;
|
pc.ln.line_no = 0;
|
||||||
pc.ln.len = 0;
|
pc.ln.len = 0;
|
||||||
pc.ln.boff = 0;
|
pc.ln.boff = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user