[misc] Fixup coding style

This commit is contained in:
ejurgensen 2017-01-22 23:47:45 +01:00
parent 5dc8eea4c2
commit 36d9051a91

View File

@ -940,8 +940,8 @@ extern mach_port_t clock_port;
#ifndef HAVE_CLOCK_GETTIME #ifndef HAVE_CLOCK_GETTIME
int int
clock_gettime(clockid_t clock_id, struct timespec *tp) { clock_gettime(clockid_t clock_id, struct timespec *tp)
{
static int clock_init = 0; static int clock_init = 0;
static clock_serv_t clock; static clock_serv_t clock;
@ -988,8 +988,8 @@ clock_gettime(clockid_t clock_id, struct timespec *tp) {
} }
int int
clock_getres(clockid_t clock_id, struct timespec *res) { clock_getres(clockid_t clock_id, struct timespec *res)
{
if (! res) if (! res)
return -1; return -1;
@ -1007,8 +1007,8 @@ clock_getres(clockid_t clock_id, struct timespec *res) {
#include <sys/time.h> /* ITIMER_REAL */ #include <sys/time.h> /* ITIMER_REAL */
int int
timer_create(clockid_t clock_id, void *sevp, timer_t *timer_id) { timer_create(clockid_t clock_id, void *sevp, timer_t *timer_id)
{
if (clock_id != CLOCK_MONOTONIC) if (clock_id != CLOCK_MONOTONIC)
return -1; return -1;
if (sevp) if (sevp)
@ -1021,8 +1021,8 @@ timer_create(clockid_t clock_id, void *sevp, timer_t *timer_id) {
} }
int int
timer_delete(timer_t timer_id) { timer_delete(timer_t timer_id)
{
struct itimerval timerval; struct itimerval timerval;
if (timer_id != 0) if (timer_id != 0)
@ -1034,9 +1034,8 @@ timer_delete(timer_t timer_id) {
} }
int int
timer_settime(timer_t timer_id, int flags, const struct itimerspec *tp, timer_settime(timer_t timer_id, int flags, const struct itimerspec *tp, struct itimerspec *old)
struct itimerspec *old) { {
struct itimerval tv; struct itimerval tv;
if (timer_id != 0 || ! tp || old) if (timer_id != 0 || ! tp || old)
@ -1049,8 +1048,8 @@ timer_settime(timer_t timer_id, int flags, const struct itimerspec *tp,
} }
int int
timer_getoverrun(timer_t timer_id) { timer_getoverrun(timer_t timer_id)
{
/* since we don't know if there have been signals that weren't delivered, /* since we don't know if there have been signals that weren't delivered,
assume none */ assume none */
return 0; return 0;
@ -1074,20 +1073,23 @@ mutex_init(pthread_mutex_t *mutex)
return err; return err;
} }
void log_fatal_err(int domain, const char *func, int line, int err) { void
DPRINTF(E_FATAL, domain, "%s failed at line %d, error %d (%s)\n", func, log_fatal_err(int domain, const char *func, int line, int err)
line, err, strerror(err)); {
DPRINTF(E_FATAL, domain, "%s failed at line %d, error %d (%s)\n", func, line, err, strerror(err));
abort(); abort();
} }
void log_fatal_errno(int domain, const char *func, int line) { void
DPRINTF(E_FATAL, domain, "%s failed at line %d, error %d (%s)\n", func, log_fatal_errno(int domain, const char *func, int line)
line, errno, strerror(errno)); {
DPRINTF(E_FATAL, domain, "%s failed at line %d, error %d (%s)\n", func, line, errno, strerror(errno));
abort(); abort();
} }
void log_fatal_null(int domain, const char *func, int line) { void
log_fatal_null(int domain, const char *func, int line)
{
DPRINTF(E_FATAL, domain, "%s returned NULL at line %d\n", func, line); DPRINTF(E_FATAL, domain, "%s returned NULL at line %d\n", func, line);
abort(); abort();
} }