diff options
author | Ton Voon <ton.voon@opsera.com> | 2010-06-21 13:03:24 +0100 |
---|---|---|
committer | Ton Voon <ton.voon@opsera.com> | 2010-06-21 13:03:24 +0100 |
commit | 602896277c76298bcbc152312d915dec306eda27 (patch) | |
tree | c37f9ec63b2a08915da3582e1ebbc9796de6f88f /lib/utils_base.c | |
parent | f58aa8e66bbb4ecf23cf6add7efc574abb733d3a (diff) | |
download | monitoring-plugins-602896277c76298bcbc152312d915dec306eda27.tar.gz |
Change np_state_write_string() to not be a pointer
Diffstat (limited to 'lib/utils_base.c')
-rw-r--r-- | lib/utils_base.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/utils_base.c b/lib/utils_base.c index 5eaf57bd..e6b20c87 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 | */ |
522 | void np_state_write_string(time_t *data_time, char *data_string) { | 522 | void 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(¤t_time); | 532 | time(¤t_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) { |