Skip to content

Commit e02d598

Browse files
Seija KijinAZero13
authored andcommitted
die: fix inconsistencies with usage header
The headers for the die and usage functions have different parameter names or are missing the "NORETURN" attribute Signed-off-by: Seija Kijin <[email protected]>
1 parent d882f38 commit e02d598

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

contrib/credential/wincred/git-credential-wincred.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
1414

15-
__attribute__((format (printf, 1, 2)))
16-
static void die(const char *err, ...)
15+
__attribute__((format (printf, 1, 2), __noreturn__))
16+
static void NORETURN die(const char *err, ...)
1717
{
1818
char msg[4096];
1919
va_list params;

usage.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ static const char *fmt_with_err(char *buf, int n, const char *fmt)
210210
return buf;
211211
}
212212

213-
void NORETURN die_errno(const char *fmt, ...)
213+
void NORETURN die_errno(const char *err, ...)
214214
{
215215
char buf[1024];
216216
va_list params;
@@ -221,8 +221,8 @@ void NORETURN die_errno(const char *fmt, ...)
221221
exit(128);
222222
}
223223

224-
va_start(params, fmt);
225-
die_routine(fmt_with_err(buf, sizeof(buf), fmt), params);
224+
va_start(params, err);
225+
die_routine(fmt_with_err(buf, sizeof(buf), err), params);
226226
va_end(params);
227227
}
228228

0 commit comments

Comments
 (0)