Skip to content

Commit

Permalink
Initialize a couple variables that might be used uninitialized.
Browse files Browse the repository at this point in the history
  • Loading branch information
dougnazar committed Mar 31, 2023
1 parent affa6a4 commit 5cda4f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion base/nagios.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ static void set_loadctl_defaults(void)
static int test_path_access(const char *program, int mode)
{
char *envpath, *p, *colon;
int ret, our_errno = 1500; /* outside errno range */
int ret = 0, our_errno = 1500; /* outside errno range */

if (program[0] == '/' || !(envpath = getenv("PATH")))
return access(program, mode);
Expand Down
2 changes: 1 addition & 1 deletion cgi/trends.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ int main(int argc, char **argv) {

if(timeperiod_type == TIMEPERIOD_NEXTPROBLEM) {
archived_state *temp_as;
time_t problem_t1, problem_t2 = 0;
time_t problem_t1 = 0, problem_t2 = 0;

t1 = t2;
t2 = current_time;
Expand Down

0 comments on commit 5cda4f0

Please sign in to comment.