tasn pushed a commit to branch master.
commit 540729e1a1f7e717626a339540bc2bbb09f7efbd
Author: Tom Hacohen <[email protected]>
Date: Thu Mar 21 13:30:43 2013 +0000
clock: You shouldn't pass extra parameters to a printf function.
This is not good practice.
---
src/lib/elm_clock.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/lib/elm_clock.c b/src/lib/elm_clock.c
index d03fa87..37a50f3 100644
--- a/src/lib/elm_clock.c
+++ b/src/lib/elm_clock.c
@@ -642,8 +642,14 @@ _access_info_cb(void *data __UNUSED__, Evas_Object *obj)
else ampm = "AM";
}
- eina_strbuf_append_printf(buf, (ampm) ? ("%d, %d, %s") : ("%d, %d"),
- hrs, sd->min, ampm);
+ if (ampm)
+ {
+ eina_strbuf_append_printf(buf, "%d, %d, %s", hrs, sd->min, ampm);
+ }
+ else
+ {
+ eina_strbuf_append_printf(buf, "%d, %d", hrs, sd->min);
+ }
ret = eina_strbuf_string_steal(buf);
eina_strbuf_free(buf);
--
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar