Merge branch 'jc/deref-tag' into maint
[gitweb.git] / grep.c
diff --git a/grep.c b/grep.c
index fafb8b58e08282e70f97676784bcb7e23e776490..1e15b6292d768e9daf5c5e84f9346577abdf3939 100644 (file)
--- a/grep.c
+++ b/grep.c
@@ -1756,7 +1756,7 @@ static int grep_source_load_file(struct grep_source *gs)
        if (lstat(filename, &st) < 0) {
        err_ret:
                if (errno != ENOENT)
-                       error(_("'%s': %s"), filename, strerror(errno));
+                       error_errno(_("failed to stat '%s'"), filename);
                return -1;
        }
        if (!S_ISREG(st.st_mode))
@@ -1767,7 +1767,7 @@ static int grep_source_load_file(struct grep_source *gs)
                goto err_ret;
        data = xmallocz(size);
        if (st.st_size != read_in_full(i, data, size)) {
-               error(_("'%s': short read %s"), filename, strerror(errno));
+               error_errno(_("'%s': short read"), filename);
                close(i);
                free(data);
                return -1;