summaryrefslogtreecommitdiffstats
path: root/lib/utils_base.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/utils_base.c')
-rw-r--r--lib/utils_base.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/utils_base.c b/lib/utils_base.c
index 5eaf57b..e6b20c8 100644
--- a/lib/utils_base.c
+++ b/lib/utils_base.c
@@ -519,7 +519,7 @@ int _np_state_read_file(FILE *f) {
519 * two things writing to same key at same time. 519 * two things writing to same key at same time.
520 * Will die with UNKNOWN if errors 520 * Will die with UNKNOWN if errors
521 */ 521 */
522void np_state_write_string(time_t *data_time, char *data_string) { 522void np_state_write_string(time_t data_time, char *data_string) {
523 FILE *fp; 523 FILE *fp;
524 char *temp_file=NULL; 524 char *temp_file=NULL;
525 int fd=0, result=0; 525 int fd=0, result=0;
@@ -528,10 +528,10 @@ void np_state_write_string(time_t *data_time, char *data_string) {
528 char *directories=NULL; 528 char *directories=NULL;
529 char *p=NULL; 529 char *p=NULL;
530 530
531 if(data_time==NULL) 531 if(data_time==0)
532 time(&current_time); 532 time(&current_time);
533 else 533 else
534 current_time=*data_time; 534 current_time=data_time;
535 535
536 /* If file doesn't currently exist, create directories */ 536 /* If file doesn't currently exist, create directories */
537 if(access(this_nagios_plugin->state->_filename,F_OK)!=0) { 537 if(access(this_nagios_plugin->state->_filename,F_OK)!=0) {