summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5b7af8f)
raw | patch | inline | side by side (parent: 5b7af8f)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Wed, 2 Jan 2008 22:06:24 +0000 (22:06 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Wed, 2 Jan 2008 22:06:24 +0000 (22:06 +0000) |
src/pngsize.c | patch | blob | history | |
src/rrd_graph.c | patch | blob | history |
diff --git a/src/pngsize.c b/src/pngsize.c
index 59e2003f00c404722a5e13b519c28be0a72c948f..42b849dc53edd4fb9c98122cf05fbd5dd810ec9f 100644 (file)
--- a/src/pngsize.c
+++ b/src/pngsize.c
# define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)
#endif
- if (setjmp(png_jmpbuf(png_read_ptr))){
- png_destroy_read_struct(&png_read_ptr, &info_ptr, (png_infopp)NULL);
- return 0;
- }
+ if (setjmp(png_jmpbuf(png_read_ptr))) {
+ png_destroy_read_struct(&png_read_ptr, &info_ptr, (png_infopp) NULL);
+ return 0;
+ }
png_init_io(png_read_ptr, fd);
png_read_info(png_read_ptr, info_ptr);
diff --git a/src/rrd_graph.c b/src/rrd_graph.c
index fb3c7e9c1381d29f519f90f6c6e3f567a25624f3..ab45aafb3f7b12b57d1499667dc1b4dc13f24a13 100644 (file)
--- a/src/rrd_graph.c
+++ b/src/rrd_graph.c
if (im->minval > im->maxval) {
if (im->minval > 0)
im->minval = 0.99 * im->maxval;
- else
+ else
im->minval = 1.01 * im->maxval;
}
/* make sure min and max are not equal */
- if (AlmostEqual2sComplement(im->minval,im->maxval,4)) {
- if (im->maxval > 0)
+ if (AlmostEqual2sComplement(im->minval, im->maxval, 4)) {
+ if (im->maxval > 0)
im->maxval *= 1.01;
else
im->maxval *= 0.99;
/* make sure min and max are not both zero */
- if (AlmostEqual2sComplement(im->maxval,0,4)) {
+ if (AlmostEqual2sComplement(im->maxval, 0, 4)) {
im->maxval = 1.0;
}
}