Imported Upstream version 1.7.6p1
[debian/sudo] / memrchr.c
index 9a5cfd0afda503507913ce56dca0eaf697e4990a..425fcb47d04b2b1d8d7eeae10dd1c16f0985be7e 100644 (file)
--- a/memrchr.c
+++ b/memrchr.c
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#include <sys/types.h>
 #include <config.h>
-#include <compat.h>
-
-#ifndef lint
-__unused static const char rcsid[] = "$Sudo: memrchr.c,v 1.1.2.2 2007/06/19 21:00:35 millert Exp $";
-#endif /* lint */
 
 #include <sys/types.h>
-#include <config.h>
+
+#include "missing.h"
 
 /*
  * Reverse memchr()
- * Find the last occurence of 'c' in the buffer 's' of size 'n'.
+ * Find the last occurrence of 'c' in the buffer 's' of size 'n'.
  */
-VOID *
+void *
 memrchr(s, c, n)
-    const VOID *s;
+    const void *s;
     int c;
     size_t n;
 {
@@ -41,8 +36,8 @@ memrchr(s, c, n)
        cp = (unsigned char *)s + n;
        do {
            if (*(--cp) == (unsigned char)c)
-               return((VOID *)cp);
+               return (void *)cp;
        } while (--n != 0);
     }
-    return((VOID *)0);
+    return (void *)0;
 }