[Xfce4-commits] <tumbler:master> Store min length value.

Nick Schermer noreply at xfce.org
Sun May 5 12:20:03 CEST 2013


Updating branch refs/heads/master
         to f609dccf3ae0e44f609d2b7bb36ef72ee109f876 (commit)
       from a9c038264712a58b38981bdb0aa2d0a672017b18 (commit)

commit f609dccf3ae0e44f609d2b7bb36ef72ee109f876
Author: Nick Schermer <nick at xfce.org>
Date:   Sun May 5 12:14:11 2013 +0200

    Store min length value.

 tumbler/tumbler-file-info.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/tumbler/tumbler-file-info.c b/tumbler/tumbler-file-info.c
index 45ccebe..bfaef89 100644
--- a/tumbler/tumbler-file-info.c
+++ b/tumbler/tumbler-file-info.c
@@ -388,18 +388,20 @@ tumbler_file_info_array_new_with_flavor (const gchar *const     *uris,
   guint             num_uris;
   guint             num_mime_types;
   guint             n;
+  guint             num;
 
   g_return_val_if_fail (uris != NULL, NULL);
 
   num_uris = g_strv_length ((gchar **)uris);
   num_mime_types = g_strv_length ((gchar **)mime_types);
+  num = MIN (num_uris, num_mime_types);
 
   if (length != NULL)
-    *length = MIN (num_uris, num_mime_types);
+    *length = num;
 
-  infos = g_new0 (TumblerFileInfo *, MIN (num_uris, num_mime_types) + 1);
+  infos = g_new0 (TumblerFileInfo *, num + 1);
 
-  for (n = 0; n < MIN (num_uris, num_mime_types); ++n)
+  for (n = 0; n < num; ++n)
     infos[n] = tumbler_file_info_new (uris[n], mime_types[n], flavor);
 
   infos[n] = NULL;


More information about the Xfce4-commits mailing list