ccache/0001-Remove-incorrect-result-check-in-format.patch
LuK1337 61aac70249 Update to 3.7.8
* Also remove unused patch file while at it.
2020-03-30 21:03:11 +02:00

39 lines
997 B
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From 0b1a0d78bfaac9321fc077464002bd42e6f15e5e Mon Sep 17 00:00:00 2001
From: Joel Rosdahl <joel@rosdahl.net>
Date: Tue, 24 Mar 2020 21:33:56 +0100
Subject: [PATCH] Remove incorrect result check in `format`
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
`format` considers a zero-length result (e.g. from `format("%s", "")`)
to be a fatal error. The check originates from 0a7cea64 where it was
appropriate but become incorrect later when refactoring the original
`x_asprintf2` function to `format`.
I cant find any call to `format` that would trigger this edge case, but
lets remove the erroneous check anyway.
Related to #568.
---
src/util.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/util.c b/src/util.c
index b6cce75..0fd3f0f 100644
--- a/src/util.c
+++ b/src/util.c
@@ -703,9 +703,6 @@ format(const char *format, ...)
}
va_end(ap);
- if (!*ptr) {
- fatal("Internal error in format");
- }
return ptr;
}
--
2.25.1