OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [config/] [memcmp.c] - Diff between revs 154 and 816

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 154 Rev 816
/* Public domain.  */
/* Public domain.  */
#include <stddef.h>
#include <stddef.h>
 
 
int
int
memcmp (const void *str1, const void *str2, size_t count)
memcmp (const void *str1, const void *str2, size_t count)
{
{
  const unsigned char *s1 = str1;
  const unsigned char *s1 = str1;
  const unsigned char *s2 = str2;
  const unsigned char *s2 = str2;
 
 
  while (count-- > 0)
  while (count-- > 0)
    {
    {
      if (*s1++ != *s2++)
      if (*s1++ != *s2++)
          return s1[-1] < s2[-1] ? -1 : 1;
          return s1[-1] < s2[-1] ? -1 : 1;
    }
    }
  return 0;
  return 0;
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.