X-Git-Url: http://wpitchoune.net/gitweb/?a=blobdiff_plain;f=src%2Fgraph.c;h=3b04993449d5f15d1a63dac3ece367a70d103e00;hb=573a01a68ca7cfc7c0afc6c128737dd05dd11625;hp=16eb5ed242c1707081a7b5b15b2c3da6ea57dd60;hpb=01948e6facb18dd1dd2052cc9a6ba209ed7d7466;p=psensor.git diff --git a/src/graph.c b/src/graph.c index 16eb5ed..3b04993 100644 --- a/src/graph.c +++ b/src/graph.c @@ -28,6 +28,7 @@ #include #include +#include #include #include @@ -247,7 +248,7 @@ static double dashes[] = { 1.0, /* ink */ 2.0, /* skip */ }; -static int ndash = sizeof(dashes) / sizeof(dashes[0]); +static int ndash = ARRAY_SIZE(dashes); static void draw_background_lines(cairo_t *cr, int min, int max, @@ -331,7 +332,8 @@ static void draw_sensor_smooth_curve(struct psensor *s, /* search the index of the first measure used as a start point * of a Bezier curve. The start and end points of the Bezier * curves must be preserved to ensure the same overall shape - * of the graph. */ + * of the graph. + */ i = 0; if (stimes) { while (i < s->values_max_length) {