raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=dc8da37878d143ff41986cf2aeb486d0d8f0284d

commit dc8da37878d143ff41986cf2aeb486d0d8f0284d
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Sat Feb 10 14:38:29 2018 +0900

    elm - make progress test code a little more solid and nice to read
    
    use sizeof the buffer rather than constant in snprint and 0.5 rather
    than .50 which almost looks like a typo... :) also use correct escape
    for % (%%%% so it becoems %% which is correct for a fmt string yto
    produce %)
---
 src/bin/elementary/test_progressbar.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/elementary/test_progressbar.c 
b/src/bin/elementary/test_progressbar.c
index 3599c72f21..371c902bf0 100644
--- a/src/bin/elementary/test_progressbar.c
+++ b/src/bin/elementary/test_progressbar.c
@@ -164,7 +164,7 @@ test_progressbar(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *eve
    elm_box_pack_end(bx, hbx);
    evas_object_show(hbx);
 
-   snprintf(form, 20, "%d percent (%d %%)", 50, 50);
+   snprintf(form, sizeof(form), "%d percent (%d%%%%)", 50, 50);
 
    pb = elm_progressbar_add(win);
    elm_progressbar_horizontal_set(pb, EINA_FALSE);
@@ -172,7 +172,7 @@ test_progressbar(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *eve
    evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, EVAS_HINT_FILL);
    elm_box_pack_end(hbx, pb);
    elm_progressbar_unit_format_set(pb, form);
-   elm_progressbar_value_set(pb, .50);
+   elm_progressbar_value_set(pb, 0.5);
    elm_object_text_set(pb, "percent");
    evas_object_show(pb);
    pd->pb4 = pb;

-- 


Reply via email to