aboutsummaryrefslogtreecommitdiffstats
path: root/rawmemrchr.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2018-10-20 19:05:06 +0200
committerMattias Andrée <maandree@kth.se>2018-10-20 19:14:26 +0200
commit3d938e4090d4dc2d5ed58bf4d00e85d8747d1228 (patch)
treef2b4d3cc33afa1bd61264ee88295e95073836a9c /rawmemrchr.c
parentAdd man pages for putenvf and getenv functions (diff)
downloadlibsimple-3d938e4090d4dc2d5ed58bf4d00e85d8747d1228.tar.gz
libsimple-3d938e4090d4dc2d5ed58bf4d00e85d8747d1228.tar.bz2
libsimple-3d938e4090d4dc2d5ed58bf4d00e85d8747d1228.tar.xz
Add man pages for memrchr, rawmemchr, and rawmemrchr
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--rawmemrchr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/rawmemrchr.c b/rawmemrchr.c
index 82a2d98..3731c00 100644
--- a/rawmemrchr.c
+++ b/rawmemrchr.c
@@ -4,10 +4,10 @@
void *
-libsimple_rawmemrchr(const void *s_, int c, size_t n)
+libsimple_rawmemrchr(const void *s_, int c_, size_t n)
{
- char *s = *(char **)(void *)&s_;
- while ((int)s[--n] != c);
+ char *s = *(char **)(void *)&s_, c = (char)c_;
+ while (s[--n] != c);
return &s[n];
}