diff options
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 4fb6375d..3822bcf1 100644 --- a/lib/utils_base.c +++ b/lib/utils_base.c | |||
@@ -477,7 +477,7 @@ void np_enable_state(char *keyname, int expected_data_version) { | |||
477 | this_state->state_data=NULL; | 477 | this_state->state_data=NULL; |
478 | 478 | ||
479 | /* Calculate filename */ | 479 | /* Calculate filename */ |
480 | ret = xasprintf(&temp_filename, "%s/%lu/%s/%s", | 480 | ret = asprintf(&temp_filename, "%s/%lu/%s/%s", |
481 | _np_state_calculate_location_prefix(), (unsigned long)geteuid(), | 481 | _np_state_calculate_location_prefix(), (unsigned long)geteuid(), |
482 | this_monitoring_plugin->plugin_name, this_state->name); | 482 | this_monitoring_plugin->plugin_name, this_state->name); |
483 | if (ret < 0) | 483 | if (ret < 0) |
@@ -619,7 +619,7 @@ void np_state_write_string(time_t data_time, char *data_string) { | |||
619 | 619 | ||
620 | /* If file doesn't currently exist, create directories */ | 620 | /* If file doesn't currently exist, create directories */ |
621 | if(access(this_monitoring_plugin->state->_filename,F_OK)!=0) { | 621 | if(access(this_monitoring_plugin->state->_filename,F_OK)!=0) { |
622 | result = xasprintf(&directories, "%s", this_monitoring_plugin->state->_filename); | 622 | result = asprintf(&directories, "%s", this_monitoring_plugin->state->_filename); |
623 | if(result < 0) | 623 | if(result < 0) |
624 | die(STATE_UNKNOWN, _("Cannot allocate memory: %s"), | 624 | die(STATE_UNKNOWN, _("Cannot allocate memory: %s"), |
625 | strerror(errno)); | 625 | strerror(errno)); |
@@ -638,7 +638,7 @@ void np_state_write_string(time_t data_time, char *data_string) { | |||
638 | np_free(directories); | 638 | np_free(directories); |
639 | } | 639 | } |
640 | 640 | ||
641 | result = xasprintf(&temp_file,"%s.XXXXXX",this_monitoring_plugin->state->_filename); | 641 | result = asprintf(&temp_file,"%s.XXXXXX",this_monitoring_plugin->state->_filename); |
642 | if(result < 0) | 642 | if(result < 0) |
643 | die(STATE_UNKNOWN, _("Cannot allocate memory: %s"), | 643 | die(STATE_UNKNOWN, _("Cannot allocate memory: %s"), |
644 | strerror(errno)); | 644 | strerror(errno)); |