From 755d7b37f6999b06f830ad424aff217dbcedb889 Mon Sep 17 00:00:00 2001 From: Scoopta Date: Sun, 26 Jan 2020 12:03:08 -0800 Subject: [PATCH] Removed the if statement in the sort code, it's not needed --- src/wofi.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/wofi.c b/src/wofi.c index 2c8455c..d2a68c5 100644 --- a/src/wofi.c +++ b/src/wofi.c @@ -733,13 +733,7 @@ static gint do_sort(GtkFlowBoxChild* child1, GtkFlowBoxChild* child2, gpointer d free(_filter); free(t1); free(t2); - if(dist1 < dist2) { - return -1; - } else if(dist1 > dist2) { - return 1; - } else { - return 0; - } + return dist1 - dist2; } static gboolean key_press(GtkWidget* widget, GdkEvent* event, gpointer data) {