fast-import.c: use error_errno()

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Nguyễn Thái Ngọc Duy committed May 8, 2016 at 16:47 UTC 6c223e495877001987e525ca93b7fdd63e03b529
1 file changed +5 -5
fast-import.c
+5 -5
@@ -414,7 +414,7 @@ static void write_crash_report(const char *err)
414 struct recent_command *rc;
415
416 if (!rpt) {
417 - error("can't write crash report %s: %s", loc, strerror(errno));
417 + error_errno("can't write crash report %s", loc);
418 free(loc);
419 return;
420 }
@@ -1806,8 +1806,8 @@ static void dump_marks(void)
1806 return;
1807
1808 if (hold_lock_file_for_update(&mark_lock, export_marks_file, 0) < 0) {
1809 - failure |= error("Unable to write marks file %s: %s",
1810 - export_marks_file, strerror(errno));
1809 + failure |= error_errno("Unable to write marks file %s",
1810 + export_marks_file);
1811 return;
1812 }
1813
@@ -1822,8 +1822,8 @@ static void dump_marks(void)
1822
1823 dump_marks_helper(f, 0, marks);
1824 if (commit_lock_file(&mark_lock)) {
1825 - failure |= error("Unable to write file %s: %s",
1826 - export_marks_file, strerror(errno));
1825 + failure |= error_errno("Unable to write file %s",
1826 + export_marks_file);
1827 return;
1828 }
1829 }