patch-1.3.94 linux/arch/m68k/lib/memcmp.c

Next file: linux/arch/m68k/lib/memcpy.c
Previous file: linux/arch/m68k/lib/checksum.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.93/linux/arch/m68k/lib/memcmp.c linux/arch/m68k/lib/memcmp.c
@@ -0,0 +1,11 @@
+#include <linux/types.h>
+
+int memcmp(const void * cs,const void * ct,size_t count)
+{
+  const unsigned char *su1, *su2;
+
+  for( su1 = cs, su2 = ct; 0 < count; ++su1, ++su2, count--)
+    if (*su1 != *su2)
+      return((*su1 < *su2) ? -1 : +1);
+  return(0);
+}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this