Skip to content

Commit

Permalink
Fix for separate build directory & a couple small cleanups (#993)
Browse files Browse the repository at this point in the history
* Fix building cgis in a separate builddir

Commit c974362 added a dependancy on locations.h which is a
generated file and in the build include dir.

* Remove unused command_file_fp

* Remove unused walks variable
  • Loading branch information
dougnazar authored Sep 19, 2024
1 parent 1347584 commit 9b68cba
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
3 changes: 1 addition & 2 deletions base/commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
extern int sigrestart;

static int command_file_fd;
static FILE *command_file_fp;
static int command_file_created = FALSE;

/* The command file worker process */
Expand Down Expand Up @@ -117,7 +116,7 @@ int close_command_file(void)
command_file_created = FALSE;

/* close the command file */
fclose(command_file_fp);
close(command_file_fd);

/* unlink the pipe */
unlink(command_file);
Expand Down
2 changes: 1 addition & 1 deletion cgi/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ CGIEXTRAS=@CGIEXTRAS@

CP=@CP@
CC=@CC@
CFLAGS=-Wall -I.. -I@builddir@ -I$(SRC_INCLUDE) -I@top_srcdir@ -I$(BLD_LIB) @CFLAGS@ @DEFS@ -DNSCGI
CFLAGS=-Wall -I.. -I@builddir@ -I$(SRC_INCLUDE) -I@top_srcdir@ -I$(BLD_INCLUDE) -I$(BLD_LIB) @CFLAGS@ @DEFS@ -DNSCGI
JSONFLAGS=-DJSON_NAGIOS_4X

# Compiler flags for optimization (overrides default)
Expand Down
3 changes: 0 additions & 3 deletions lib/test-squeue.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ typedef struct sq_test_event {
static time_t sq_high = 0;
static int sq_walker(squeue_event *evt, void *arg)
{
static int walks = 0;

walks++;
t(sq_high <= evt->when.tv_sec, "sq_high: %lu; evt->when: %lu\n",
sq_high, evt->when.tv_sec);
sq_high = (unsigned long)evt->when.tv_sec;
Expand Down

0 comments on commit 9b68cba

Please sign in to comment.