devilhorns pushed a commit to branch master.
commit 397e8afc1a32bc91f5310a0c5137883522a955e4
Author: Chris Michael <[email protected]>
Date: Mon Aug 5 12:42:31 2013 +0100
Avoid potential divide by zero in INF call.
Signed-off-by: Chris Michael <[email protected]>
---
src/bin/edje/edje_cc_out.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/bin/edje/edje_cc_out.c b/src/bin/edje/edje_cc_out.c
index b11fb7e..c5caf2f 100644
--- a/src/bin/edje/edje_cc_out.c
+++ b/src/bin/edje/edje_cc_out.c
@@ -728,11 +728,14 @@ data_thread_image(void *data, Ecore_Thread *thread
EINA_UNUSED)
struct stat st;
if (!iw->path || (stat(iw->path, &st))) st.st_size = 0;
- INF("Wrote %9i bytes (%4iKb) for \"%s\" image entry \"%s\" compress:
[raw: %2.1f%%] [real: %2.1f%%]",
- bytes, (bytes + 512) / 1024, buf, iw->img->entry,
- 100 - (100 * (double)bytes) / ((double)(iw->w * iw->h * 4)),
- 100 - (100 * (double)bytes) / ((double)(st.st_size))
- );
+ if (st.st_size > 0)
+ {
+ INF("Wrote %9i bytes (%4iKb) for \"%s\" image entry \"%s\"
compress: [raw: %2.1f%%] [real: %2.1f%%]",
+ bytes, (bytes + 512) / 1024, buf, iw->img->entry,
+ 100 - (100 * (double)bytes) / ((double)(iw->w * iw->h * 4)),
+ 100 - (100 * (double)bytes) / ((double)(st.st_size))
+ );
+ }
}
}
--
------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk