avoid dead code in i_get_anonymous_color_histo()
[imager.git] / Imager.xs
index 7f428e3..7017e9a 100644 (file)
--- a/Imager.xs
+++ b/Imager.xs
@@ -2670,17 +2670,14 @@ i_get_anonymous_color_histo(im, maxc = 0x40000000)
         int col_cnt;
     PPCODE:
        col_cnt = i_get_anonymous_color_histo(im, &col_usage, maxc);
-        if (col_cnt > 0) {
-            EXTEND(SP, col_cnt);
-            for (i = 0; i < col_cnt; i++)  {
-                PUSHs(sv_2mortal(newSViv( col_usage[i])));
-            }
-            myfree(col_usage);
-            XSRETURN(col_cnt);
-        }
-        else {
-            XSRETURN_EMPTY;
+        if (col_cnt <= 0) {
+           XSRETURN_EMPTY;
+       }
+        EXTEND(SP, col_cnt);
+        for (i = 0; i < col_cnt; i++)  {
+            PUSHs(sv_2mortal(newSViv( col_usage[i])));
         }
+        myfree(col_usage);
 
 
 void