projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ceph plugin: mark variable as static and const
[collectd.git]
/
src
/
ceph.c
diff --git
a/src/ceph.c
b/src/ceph.c
index
251def9
..
b1ca3b6
100644
(file)
--- a/
src/ceph.c
+++ b/
src/ceph.c
@@
-45,7
+45,6
@@
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
-#include <sys/socket.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/un.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/un.h>
@@
-97,7
+96,7
@@
enum ceph_dset_type_d
};
/** Valid types for ceph defined in types.db */
};
/** Valid types for ceph defined in types.db */
-
const char *
ceph_dset_types [CEPH_DSET_TYPES_NUM] =
+
static const char * const
ceph_dset_types [CEPH_DSET_TYPES_NUM] =
{"ceph_latency", "ceph_bytes", "ceph_rate"};
/******* ceph_daemon *******/
{"ceph_latency", "ceph_bytes", "ceph_rate"};
/******* ceph_daemon *******/
@@
-1097,7
+1096,7
@@
static int cconn_connect(struct cconn *io)
fd = socket(PF_UNIX, SOCK_STREAM, 0);
if(fd < 0)
{
fd = socket(PF_UNIX, SOCK_STREAM, 0);
if(fd < 0)
{
-
int
err = -errno;
+ err = -errno;
ERROR("ceph plugin: cconn_connect: socket(PF_UNIX, SOCK_STREAM, 0) "
"failed: error %d", err);
return err;
ERROR("ceph plugin: cconn_connect: socket(PF_UNIX, SOCK_STREAM, 0) "
"failed: error %d", err);
return err;
@@
-1546,7
+1545,7
@@
static int cconn_main_loop(uint32_t request_type)
}
else
{
}
else
{
-
int
ret = cconn_handle_event(io);
+ ret = cconn_handle_event(io);
if(ret)
{
WARNING("ceph plugin: cconn_handle_event(name=%s,"
if(ret)
{
WARNING("ceph plugin: cconn_handle_event(name=%s,"