We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 27b8b31 commit 63d8cd1Copy full SHA for 63d8cd1
src/apply.c
@@ -24,9 +24,6 @@
24
#include "reader.h"
25
#include "index.h"
26
27
-#define apply_err(...) \
28
- ( git_error_set(GIT_ERROR_PATCH, __VA_ARGS__), GIT_EAPPLYFAIL )
29
-
30
typedef struct {
31
/* The lines that we allocate ourself are allocated out of the pool.
32
* (Lines may have been allocated out of the diff.)
@@ -35,6 +32,18 @@ typedef struct {
35
git_vector lines;
36
33
} patch_image;
37
34
+static int apply_err(const char *fmt, ...) GIT_FORMAT_PRINTF(1, 2);
+static int apply_err(const char *fmt, ...)
+{
38
+ va_list ap;
39
+
40
+ va_start(ap, fmt);
41
+ git_error_vset(GIT_ERROR_PATCH, fmt, ap);
42
+ va_end(ap);
43
44
+ return GIT_EAPPLYFAIL;
45
+}
46
47
static void patch_line_init(
48
git_diff_line *out,
49
const char *in,
0 commit comments