summaryrefslogtreecommitdiff
path: root/grep.c
diff options
context:
space:
mode:
Diffstat (limited to 'grep.c')
-rw-r--r--grep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/grep.c b/grep.c
index 6e085f8..b58c7c6 100644
--- a/grep.c
+++ b/grep.c
@@ -1661,8 +1661,8 @@ void grep_source_init(struct grep_source *gs, enum grep_source_type type,
const void *identifier)
{
gs->type = type;
- gs->name = name ? xstrdup(name) : NULL;
- gs->path = path ? xstrdup(path) : NULL;
+ gs->name = xstrdup_or_null(name);
+ gs->path = xstrdup_or_null(path);
gs->buf = NULL;
gs->size = 0;
gs->driver = NULL;