summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9cd66f2)
raw | patch | inline | side by side (parent: 9cd66f2)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Thu, 5 Jun 2008 19:59:18 +0000 (19:59 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Thu, 5 Jun 2008 19:59:18 +0000 (19:59 +0000) |
src/rrd.h | patch | blob | history | |
src/rrd_error.c | patch | blob | history | |
src/rrd_format.h | patch | blob | history | |
src/rrd_gfx.c | patch | blob | history | |
src/rrd_info.c | patch | blob | history | |
src/rrd_open.c | patch | blob | history | |
src/rrd_update.c | patch | blob | history |
diff --git a/src/rrd.h b/src/rrd.h
index 5f4145bde9a5d81c32a0156e354e18b65d795a06..376d84f1c4a0895909b73b5fd14a5ad6b6e58650 100644 (file)
--- a/src/rrd.h
+++ b/src/rrd.h
/* END parsetime.h */
struct rrd_context {
- char lib_errstr[256];
- char rrd_error[4096];
+ char lib_errstr[256];
+ char rrd_error[4096];
};
/* returns the current per-thread rrd_context */
diff --git a/src/rrd_error.c b/src/rrd_error.c
index e64e2df1179b01a05a20b578132a07c3f9e54fef..e368ca755f86198426e83e50e626f8ad5489f2da 100644 (file)
--- a/src/rrd_error.c
+++ b/src/rrd_error.c
struct rrd_context *rrd_ctx =
(struct rrd_context *) malloc(sizeof(struct rrd_context));
- if (! rrd_ctx) {
+ if (!rrd_ctx) {
return NULL;
}
diff --git a/src/rrd_format.h b/src/rrd_format.h
index 5828f90ce1dcd8762ad96be9695b8e43f3c9edc4..5d86857674b91bf25a60fcb8b20211162351efb0 100644 (file)
--- a/src/rrd_format.h
+++ b/src/rrd_format.h
ds_def_t *ds_def; /* list of data source definitions */
rra_def_t *rra_def; /* list of round robin archive def */
live_head_t *live_head; /* rrd v >= 3 last_up with us */
- time_t *legacy_last_up; /* rrd v < 3 last_up time */
+ time_t *legacy_last_up; /* rrd v < 3 last_up time */
pdp_prep_t *pdp_prep; /* pdp data prep area */
cdp_prep_t *cdp_prep; /* cdp prep area */
rra_ptr_t *rra_ptr; /* list of rra pointers */
diff --git a/src/rrd_gfx.c b/src/rrd_gfx.c
index 30a372af8fc098dfeb7fcbcef16e6c68ef18c673..aa7b3ae9fa84ac18849b6f0d757b51c527e063c1 100644 (file)
--- a/src/rrd_gfx.c
+++ b/src/rrd_gfx.c
tab_array = pango_tab_array_new(tab_count, (gboolean) (1));
for (i = 1; i <= tab_count; i++) {
pango_tab_array_set_tab(tab_array,
- i, PANGO_TAB_LEFT, tabwidth * i - tab_shift+border);
+ i, PANGO_TAB_LEFT,
+ tabwidth * i - tab_shift + border);
}
cairo_new_path(cr);
cairo_set_source_rgba(cr, color.red, color.green, color.blue,
font_desc = pango_font_description_from_string(font);
pango_font_description_set_size(font_desc, size * PANGO_SCALE);
pango_layout_set_font_description(layout, font_desc);
- pango_layout_set_markup(layout, text, -1);
+ if (im->with_markup)
+ pango_layout_set_markup(layout, text, -1);
return layout;
}
diff --git a/src/rrd_info.c b/src/rrd_info.c
index 13d30a6cd37fed0a5d70b3376882adaf7c68b1b5..f53a752ee29e7755daae0caeb43b750f66f28462 100644 (file)
--- a/src/rrd_info.c
+++ b/src/rrd_info.c
int maxlen = 1024 + strlen(fmt);
char *str = NULL;
va_list argp;
- str = malloc(sizeof(char) * (maxlen+1));
+ str = malloc(sizeof(char) * (maxlen + 1));
if (str != NULL) {
va_start(argp, fmt);
#ifdef HAVE_VSNPRINTF
diff --git a/src/rrd_open.c b/src/rrd_open.c
index e1685d2924aa8cb33be18ddc73dda5753692d560..c0e483591c8c9f8d76eff1070501a91822966f83 100644 (file)
--- a/src/rrd_open.c
+++ b/src/rrd_open.c
rrd_set_error("live_head_t malloc");
goto out_close;
}
-
#if defined USE_MADVISE
/* the live_head will be needed soonish, so hint accordingly */
- madvise(data + PAGE_START(offset),
- sizeof(time_t), MADV_WILLNEED);
-#endif
- __rrd_read(rrd->legacy_last_up,time_t,1);
+ madvise(data + PAGE_START(offset), sizeof(time_t), MADV_WILLNEED);
+#endif
+ __rrd_read(rrd->legacy_last_up, time_t,
+ 1);
+
rrd->live_head->last_up = *rrd->legacy_last_up;
rrd->live_head->last_up_usec = 0;
} else {
void rrd_free(
rrd_t *rrd)
{
- if (rrd->legacy_last_up){ /* this gets set for version < 3 only */
- free(rrd->live_head);
+ if (rrd->legacy_last_up) { /* this gets set for version < 3 only */
+ free(rrd->live_head);
}
}
#else
diff --git a/src/rrd_update.c b/src/rrd_update.c
index 66b4670085c1daa46b2570fb6ff1f2911192320e..44dddf28af89328419f369c855fd60c52992c143 100644 (file)
--- a/src/rrd_update.c
+++ b/src/rrd_update.c
rrd->live_head->last_up = *current_time;
rrd->live_head->last_up_usec = *current_time_usec;
- if ( version < 3 ){
+ if (version < 3) {
*rrd->legacy_last_up = rrd->live_head->last_up;
}
free(seasonal_coef);