image: Initialize parameters in case of it just returns without assigning any value.
authorDaniel Juyung Seo <seojuyung2@gmail.com>
Mon, 16 Mar 2015 14:19:17 +0000 (23:19 +0900)
committerDaniel Juyung Seo <seojuyung2@gmail.com>
Mon, 16 Mar 2015 14:19:20 +0000 (23:19 +0900)
In this way, callers does not need to consider initializing the
parameters for their local variables.

src/lib/elm_image.c

index 7a852b8..257ff89 100644 (file)
@@ -917,6 +917,9 @@ _elm_image_object_size_get(Eo *obj EINA_UNUSED, Elm_Image_Data *sd, int *w, int
    int cw = 0, ch = 0;
    const char *type;
 
+   if (w) *w = 0;
+   if (h) *h = 0;
+
    type = evas_object_type_get(sd->img);
    if (!type) return;