diff --git a/conf_schema.c b/conf_schema.c index 0246c90a..d5165199 100644 --- a/conf_schema.c +++ b/conf_schema.c @@ -875,7 +875,6 @@ static int cf_opt_network_interface_legacy(struct config_network_interface *nifp { //DEBUGF("%s text=%s", __FUNCTION__, alloca_str_toprint(text)); struct config_network_interface nif; - (&nif); cf_dfl_config_network_interface(&nif); if (text[0] != '+' && text[0] != '-') return CFINVALID; // "Sign must be + or -" diff --git a/golay.c b/golay.c index 9599a497..4f42f6d7 100644 --- a/golay.c +++ b/golay.c @@ -217,6 +217,6 @@ int golay_decode(int *errs, const uint8_t *data) cw=correct(cw, errs); /* correct up to three bits */ cw|=parity_bit; if (parity(cw)) - *errs++; + ++*errs; return cw&0xFFF; } /* decode */ diff --git a/msp_proxy.c b/msp_proxy.c index ceca464c..689da57a 100644 --- a/msp_proxy.c +++ b/msp_proxy.c @@ -71,9 +71,11 @@ struct profile_total mdp_sock_stats={ }; struct sched_ent mdp_sock={ - .poll.revents = 0, - .poll.events = POLLIN, - .poll.fd = -1, + .poll = { + .revents = 0, + .events = POLLIN, + .fd = -1 + }, .function = msp_poll, .stats = &mdp_sock_stats, }; @@ -83,9 +85,11 @@ struct profile_total service_sock_stats={ }; struct sched_ent service_sock={ - .poll.revents = 0, - .poll.events = POLLIN, - .poll.fd = -1, + .poll = { + .revents = 0, + .events = POLLIN, + .fd = -1 + }, .function = service_poll, .stats = &service_sock_stats, }; @@ -99,9 +103,11 @@ struct profile_total listen_stats={ }; struct sched_ent listen_alarm={ - .poll.revents = 0, - .poll.events = POLLIN, - .poll.fd = -1, + .poll = { + .revents = 0, + .events = POLLIN, + .fd = -1 + }, .function = listen_poll, .stats = &listen_stats, }; diff --git a/os.c b/os.c index 2596fc34..41194db5 100644 --- a/os.c +++ b/os.c @@ -361,7 +361,7 @@ ssize_t get_self_executable_path(char *buf, size_t len) return read_symlink("/proc/self/path/a.out", buf, len); #elif defined (__APPLE__) uint32_t bufsize = len; - return _NSGetExecutablePath(buf, &bufsize) == -1 && len ? -1 : bufsize; + return _NSGetExecutablePath(buf, &bufsize) || len == 0 ? bufsize : -1; #else #error Unable to find executable path #endif diff --git a/rhizome_database.c b/rhizome_database.c index b8b71155..42bb8857 100644 --- a/rhizome_database.c +++ b/rhizome_database.c @@ -1073,7 +1073,7 @@ int _sqlite_vexec_strbuf_retry(struct __sourceloc __whence, sqlite_retry_state * while ((stepcode = _sqlite_step(__whence, LOG_LEVEL_ERROR, retry, statement)) == SQLITE_ROW) { int columncount = sqlite3_column_count(statement); if (columncount != 1) - ret - WHYF("incorrect column count %d (should be 1): %s", columncount, sqlite3_sql(statement)); + ret = WHYF("incorrect column count %d (should be 1): %s", columncount, sqlite3_sql(statement)); else if (++rowcount == 1) strbuf_puts(sb, (const char *)sqlite3_column_text(statement, 0)); }