projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
virt plugin: Disable ExtraStats selectors when unsupported by libvirt
[collectd.git]
/
src
/
nut.c
diff --git
a/src/nut.c
b/src/nut.c
index
1d1e94b
..
ae48692
100644
(file)
--- a/
src/nut.c
+++ b/
src/nut.c
@@
-27,8
+27,8
@@
#include "collectd.h"
#include "collectd.h"
-#include "common.h"
#include "plugin.h"
#include "plugin.h"
+#include "utils/common/common.h"
#include <upsclient.h>
#include <upsclient.h>
@@
-144,8
+144,7
@@
static int nut_verify_peer(const char *value) {
static int nut_ca_path(const char *value) {
if (value != NULL && strcmp(value, "") != 0) {
static int nut_ca_path(const char *value) {
if (value != NULL && strcmp(value, "") != 0) {
- ca_path = malloc(strlen(value) + 1);
- strncpy(ca_path, value, (strlen(value) + 1));
+ ca_path = strdup(value);
} else {
ca_path = NULL; // Should alread be set to NULL from initialization
}
} else {
ca_path = NULL; // Should alread be set to NULL from initialization
}