mirror of
https://github.com/openNDS/openNDS.git
synced 2026-05-04 03:01:32 -04:00
fix compiler warnings
This commit is contained in:
@@ -684,7 +684,7 @@ config_read(const char *filename)
|
||||
char lockfile[] = "/tmp/ndsctl.lock";
|
||||
|
||||
//Remove ndsctl lock file if it exists
|
||||
if (fd = fopen(lockfile, "r")) {
|
||||
if ((fd = fopen(lockfile, "r")) != NULL) {
|
||||
fclose(fd);
|
||||
remove(lockfile);
|
||||
}
|
||||
|
||||
@@ -92,8 +92,6 @@ static int do_binauth(struct MHD_Connection *connection, const char *binauth, t_
|
||||
int download;
|
||||
int rc;
|
||||
|
||||
s_config *config = config_get_config();
|
||||
|
||||
MHD_get_connection_values(connection, MHD_HEADER_KIND, get_user_agent_callback, &user_agent);
|
||||
|
||||
debug(LOG_INFO, "BinAuth: User Agent is [ %s ]", user_agent);
|
||||
@@ -825,7 +823,6 @@ static int redirect_to_splashpage(struct MHD_Connection *connection, t_client *c
|
||||
int ret = 0;
|
||||
const char *separator = "&";
|
||||
char *querystr = query_str;
|
||||
s_config *config = config_get_config();
|
||||
|
||||
get_query(connection, &query, separator);
|
||||
if (!query) {
|
||||
|
||||
@@ -168,7 +168,7 @@ ndsctl_do(const char *socket, const struct argument *arg, const char *param)
|
||||
|
||||
setlogmask(LOG_UPTO (LOG_NOTICE));
|
||||
|
||||
if (fd = fopen(lockfile, "r")) {
|
||||
if ((fd = fopen(lockfile, "r")) != NULL) {
|
||||
openlog ("ndsctl", LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL1);
|
||||
syslog (LOG_NOTICE, "ndsctl is locked by another process - try again later...");
|
||||
closelog ();
|
||||
|
||||
Reference in New Issue
Block a user