vlc/vlc-2.1 | branch: master | Felix Paul Kühne <fkue...@videolan.org> | Wed 
Sep 11 17:54:27 2013 +0200| [e18da265dba5d6d61143a6d8871594f5b6980a34] | 
committer: Felix Paul Kühne

macosx: minor code cleanup

(cherry picked from commit ae7b7ece58550de04680fa0ff680a9da19cfb1ed)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=e18da265dba5d6d61143a6d8871594f5b6980a34
---

 modules/gui/macosx/bookmarks.m |   21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/modules/gui/macosx/bookmarks.m b/modules/gui/macosx/bookmarks.m
index cf5f999..e2564d3 100644
--- a/modules/gui/macosx/bookmarks.m
+++ b/modules/gui/macosx/bookmarks.m
@@ -367,17 +367,18 @@ clear:
 
     if (!p_input)
         return 0;
-    else if (input_Control(p_input, INPUT_GET_BOOKMARKS, &pp_bookmarks, 
&i_bookmarks) != VLC_SUCCESS) {
-        vlc_object_release(p_input);
+
+    int returnValue = input_Control(p_input, INPUT_GET_BOOKMARKS, 
&pp_bookmarks, &i_bookmarks);
+    vlc_object_release(p_input);
+
+    if (returnValue != VLC_SUCCESS)
         return 0;
-    } else {
-        vlc_object_release(p_input);
-        // Clear the bookmark list
-        for (int i = 0; i < i_bookmarks; i++)
-            vlc_seekpoint_Delete(pp_bookmarks[i]);
-        free(pp_bookmarks);
-        return i_bookmarks;
-    }
+
+    for (int i = 0; i < i_bookmarks; i++)
+        vlc_seekpoint_Delete(pp_bookmarks[i]);
+    free(pp_bookmarks);
+
+    return i_bookmarks;
 }
 
 - (id)tableView:(NSTableView *)theDataTable objectValueForTableColumn: 
(NSTableColumn *)theTableColumn row: (NSInteger)row

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to