author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Thu, 3 Mar 2016 20:32:38 +0000 (21:32 +0100) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Thu, 3 Mar 2016 20:32:38 +0000 (21:32 +0100) |
diff --git a/src/bind.c b/src/bind.c
index 27164fd464fb2b024cb55048a85b530e64b5309e..6eac159cbcf78b1f36651aa7468f389a9baf74a8 100644 (file)
--- a/src/bind.c
+++ b/src/bind.c
for (i = 0; i < zone_nodes->nodesetval->nodeNr; i++)
{
- xmlNode *node;
-
node = zone_nodes->nodesetval->nodeTab[i];
assert (node != NULL);
diff --git a/src/collectdctl.c b/src/collectdctl.c
index 8357ce841838cad2f85238b5bbe3ba1758e1db43..d019d2742f3db6bef5d98f653ed144cdf4a42895 100644 (file)
--- a/src/collectdctl.c
+++ b/src/collectdctl.c
int status;
while (42) {
- int c;
+ int n;
- c = getopt (argc, argv, "s:h");
+ n = getopt (argc, argv, "s:h");
- if (c == -1)
+ if (n == -1)
break;
- switch (c) {
+ switch (n) {
case 's':
snprintf (address, sizeof (address), "unix:%s", optarg);
address[sizeof (address) - 1] = '\0';
diff --git a/src/daemon/plugin.c b/src/daemon/plugin.c
index 29716185db38b7ac59d9dc8a9bfe144812794c04..73d0156879d65c354b000cfd4a1267090c148e07 100644 (file)
--- a/src/daemon/plugin.c
+++ b/src/daemon/plugin.c
void plugin_init_all (void)
{
char const *chain_name;
- long write_threads_num;
llentry_t *le;
int status;
index 8c5db31662edcb49ce85390dd4d850a7dd5ae837..45444c7f912b4575984ca1937240beb3ce04ba12 100644 (file)
--- a/src/daemon/utils_cache.c
+++ b/src/daemon/utils_cache.c
if (ce->history_length < num_steps)
{
gauge_t *tmp;
- size_t i;
tmp = realloc (ce->history, sizeof (*ce->history)
* num_steps * ce->values_num);
index 0217308709c0f0db6456393adfebf4c3f7644cc8..5d2c5b2afa7a7907b6a2e3139fcf7357f563f0ae 100644 (file)
--- a/src/liboconfig/oconfig.c
+++ b/src/liboconfig/oconfig.c
yyset_in (fh);
if (NULL == c_file) {
- int status;
-
status = snprintf (file, sizeof (file), "<fd#%d>", fileno (fh));
if ((status < 0) || (status >= sizeof (file))) {
diff --git a/src/logfile.c b/src/logfile.c
index b75ecb8b39878843b5ca4abf21d89db38e2fa155..11797182639e35902be3e431022f667d9eb99839 100644 (file)
--- a/src/logfile.c
+++ b/src/logfile.c
#define APPEND(bufptr, buflen, key, value) \
if ((buflen > 0) && (strlen (value) > 0)) { \
- int status = ssnprintf (bufptr, buflen, ", %s = %s", key, value); \
+ status = ssnprintf (bufptr, buflen, ", %s = %s", key, value); \
if (status > 0) { \
bufptr += status; \
buflen -= status; \
diff --git a/src/notify_email.c b/src/notify_email.c
index 24c66ec051b965aa5cbfedd228d774430d951c53..76d48d445825c83834d93095ed35420ce288b7d1 100644 (file)
--- a/src/notify_email.c
+++ b/src/notify_email.c
/* Initiate a connection to the SMTP server and transfer the message. */
if (!smtp_start_session (session)) {
- char buf[MAXSTRING];
ERROR ("notify_email plugin: SMTP server problem: %s",
smtp_strerror (smtp_errno (), buf, sizeof buf));
pthread_mutex_unlock (&session_lock);
diff --git a/src/ntpd.c b/src/ntpd.c
index ceb1442c0568b1c0c633ffac1b087816f3926ced..ce54e029e7124c673cddcc9a6293ded9e71e9bf7 100644 (file)
--- a/src/ntpd.c
+++ b/src/ntpd.c
/* l_fp to double */
#define M_LFPTOD(r_i, r_uf, d) \
do { \
- register int32_t i; \
- register uint32_t f; \
+ register int32_t ri; \
+ register uint32_t rf; \
\
- i = (r_i); \
- f = (r_uf); \
- if (i < 0) { \
- M_NEG(i, f); \
- (d) = -((double) i + ((double) f) / 4294967296.0); \
+ ri = (r_i); \
+ rf = (r_uf); \
+ if (ri < 0) { \
+ M_NEG(ri, rf); \
+ (d) = -((double) ri + ((double) rf) / 4294967296.0); \
} else { \
- (d) = (double) i + ((double) f) / 4294967296.0; \
+ (d) = (double) ri + ((double) rf) / 4294967296.0; \
} \
} while (0)
diff --git a/src/perl.c b/src/perl.c
index 3b498f9b7ea348caf5048bc27932ccf3e0deb714..19ac08d4274156c168a1c2f0bd7a8d461a55acfc 100644 (file)
--- a/src/perl.c
+++ b/src/perl.c
return 0;
if (NULL == aTHX) {
- c_ithread_t *t = NULL;
+ t = NULL;
pthread_mutex_lock (&perl_threads->mutex);
t = c_ithread_create (perl_threads->head->interp);
diff --git a/src/python.c b/src/python.c
index c7a82c49ee6aa7a3abb2c8ed729d90b736d5110f..9d732772d9c77167fde1297df2886ef87e0d1ab5 100644 (file)
--- a/src/python.c
+++ b/src/python.c
@@ -399,7 +399,7 @@ static int cpy_write_callback(const data_set_t *ds, const value_list_t *value_li
}
dict = PyDict_New(); /* New reference. */
if (value_list->meta) {
- int i, num;
+ int num;
char **table;
meta_data_t *meta = value_list->meta;