minor fixes for pi
Costa Tsaousis (ktsaou) committed
May 8, 2014 at 02:38 UTC
ca069b92f447c3727e52269d5090abc6d18510b6
2 files changed
+2
-6
apps_plugin.c
+1
-1
@@ -73,7 +73,7 @@ struct wanted *get_wanted(const char *id, struct wanted *target)
73
74
w = calloc(sizeof(struct wanted), 1);
75
if(!w) {
76
- fprintf(stderr, "Cannot allocate %ld bytes of memory\n", sizeof(struct wanted));
76
+ fprintf(stderr, "Cannot allocate %lu bytes of memory\n", sizeof(struct wanted));
77
return NULL;
78
}
79
netdata.c
+1
-5
@@ -5694,7 +5694,7 @@ void *pluginsd_worker_thread(void *arg)
5694
char line[PLUGINSD_LINE_MAX + 1];
5695
5696
unsigned long long usec = 0, susec = 0;
5697
- struct timeval last, now;
5697
+ struct timeval last = {0, 0} , now = {0, 0};
5698
5699
while(1) {
5700
// FILE *fp = popen(cd->cmd, "r");
@@ -6487,10 +6487,6 @@ int main(int argc, char **argv)
6487
fprintf(stderr, "Cannot lower my CPU priority. Error: %s.\n", strerror(errno));
6488
}
6489
6490
- if(sizeof(long long) >= sizeof(long double)) {
6491
- fprintf(stderr, "\n\nWARNING:\nThis system does not support [long double] variables properly.\nArithmetic overflows and rounding errors may occur.\n\n");
6492
- }
6493
-
6490
if(become_daemon(0, input_log_file, output_log_file, error_log_file, access_log_file, &access_fd, &stdaccess) == -1) {
6491
fprintf(stderr, "Cannot demonize myself (%s).", strerror(errno));
6492
exit(1);