Skip to content

Commit 3402e45

Browse files
committed
Stylistic changes.
1 parent 34bc8b6 commit 3402e45

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/https_client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
#include <errno.h> // NOLINT(llvmlibc-restrict-system-libc-headers)
12
#include <ev.h> // NOLINT(llvmlibc-restrict-system-libc-headers)
23
#include <math.h> // NOLINT(llvmlibc-restrict-system-libc-headers)
34
#include <netinet/in.h> // NOLINT(llvmlibc-restrict-system-libc-headers)
45
#include <sys/socket.h> // NOLINT(llvmlibc-restrict-system-libc-headers)
5-
#include <errno.h>
66

77
#include "https_client.h"
88
#include "logging.h"

src/logging.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ static FILE *logf = NULL; // NOLINT(cppcoreguidelines-avoid-non-const-glo
1212
static int loglevel = LOG_ERROR; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
1313
static ev_timer logging_timer; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
1414

15-
static const char *_SeverityStr[] = {
15+
static const char *SeverityStr[] = {
1616
"[D]",
1717
"[I]",
1818
"[W]",
@@ -71,7 +71,7 @@ void _log(const char *file, int line, int severity, const char *fmt, ...) {
7171

7272
struct timeval tv;
7373
gettimeofday(&tv, NULL);
74-
fprintf(logf, "%s %8ld.%06ld %s:%d ", _SeverityStr[severity], tv.tv_sec,
74+
fprintf(logf, "%s %8ld.%06ld %s:%d ", SeverityStr[severity], tv.tv_sec,
7575
tv.tv_usec, file, line);
7676

7777
va_list args;

src/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,9 @@ int main(int argc, char *argv[]) {
224224

225225
if (opt.daemonize) {
226226
// daemon() is non-standard. If needed, see OpenSSH openbsd-compat/daemon.c
227-
if (daemon(0, 0) == -1)
227+
if (daemon(0, 0) == -1) {
228228
FLOG("daemon failed: %s", strerror(errno));
229+
}
229230
}
230231

231232
ev_signal sigpipe;

0 commit comments

Comments
 (0)