diff lib/misc.c @ 84:7ef60ce2bdb2

2002-12-29 Brian Masney <masneyb@gftp.org> * lib/ssh.c lib/config_file.c lib/Makefile.am lib/gftp.h lib/options.h - removed old legacy SSH protocol and option to enable this protocol * lib/gftp.h - added GFTP_ERETRYABLE and GFTP_EFATAL error codes * lib/bookmark.c lib/local.c lib/protocols.c lib/rfc959.c lib/rfc2068.c lib/sshv2.c - return new error codes instead of -1 or -2 * lib/misc.c (gftp_*_sort_function_ds) - changed return values * src/gtk/transfer.c (connect_thread) - if return value of gftp_connect() is GFTP_EFATAL, don't attempt to retry the connection
author masneyb
date Sun, 29 Dec 2002 15:16:27 +0000
parents f4f6f44225d3
children 6df043359b41
line wrap: on
line diff
--- a/lib/misc.c	Fri Dec 27 14:59:50 2002 +0000
+++ b/lib/misc.c	Sun Dec 29 15:16:27 2002 +0000
@@ -999,11 +999,7 @@
   f1 = a;
   f2 = b;
   ret = strcmp (f1->file, f2->file);
-  if (ret < 0)
-    ret = 1;
-  else if (ret > 0)
-    ret = -1;
-  return (ret);
+  return (ret * -1);
 }
 
 
@@ -1027,11 +1023,7 @@
   f1 = a;
   f2 = b;
   ret = strcmp (f1->user, f2->user);
-  if (ret < 0)
-    ret = 1;
-  else if (ret > 0)
-    ret = -1;
-  return (ret);
+  return (ret * -1);
 }
 
 
@@ -1055,11 +1047,7 @@
   f1 = a;
   f2 = b;
   ret = strcmp (f1->group, f2->group);
-  if (ret < 0)
-    ret = 1;
-  else if (ret > 0)
-    ret = -1;
-  return (ret);
+  return (ret * -1);
 }
 
 
@@ -1083,11 +1071,7 @@
   f1 = a;
   f2 = b;
   ret = strcmp (f1->attribs, f2->attribs);
-  if (ret < 0)
-    ret = 1;
-  else if (ret > 0)
-    ret = -1;
-  return (ret);
+  return (ret * -1);
 }