Skip to content

Commit

Permalink
Move err prototype to errutil.h
Browse files Browse the repository at this point in the history
  • Loading branch information
yabberyabber committed Jan 31, 2024
1 parent 107f126 commit 151e748
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 1 addition & 2 deletions err.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ int err_flags = 0;
being the most verbose and 0 being the least verbose. The default
verbosity level is 1. */

noreturn void err(int eval, const char *fmt, ...);
static int parsedverbosity(void)
{
char *pszVerbosity = getenv("BST_VERBOSITY");
Expand All @@ -41,7 +40,7 @@ static int parsedverbosity(void)
char *endPtr;
int iVerbosity = strtol(pszVerbosity, &endPtr, 10);
if (*endPtr != '\0') {
err(2, "un-parsable value of BST_VERBOSITY");
err(2, "un-parsable value of BST_VERBOSITY");
}
return iVerbosity;
}
Expand Down
3 changes: 3 additions & 0 deletions errutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#ifndef ERRUTIL_H_
# define ERRUTIL_H_

#include <stdnoreturn.h>

enum {
ERR_USE_SYSLOG = 1,

Expand All @@ -16,6 +18,7 @@ enum {
extern void (*err_exit)(int);
extern const char *err_line_ending;
void init_logverbosity();
noreturn void err(int eval, const char *fmt, ...);
extern int err_flags;

#endif /* !ERRUTIL_H */

0 comments on commit 151e748

Please sign in to comment.