bsdgrep: Use grep_strdup instead of grep_malloc+strcpy
This commit is contained in:
parent
e73154c1d7
commit
66ab298323
@ -323,8 +323,7 @@ procfile(const char *fn)
|
||||
return (0);
|
||||
}
|
||||
|
||||
pc.ln.file = grep_malloc(strlen(fn) + 1);
|
||||
strcpy(pc.ln.file, fn);
|
||||
pc.ln.file = grep_strdup(fn);
|
||||
pc.ln.line_no = 0;
|
||||
pc.ln.len = 0;
|
||||
pc.ln.boff = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user