aboutsummaryrefslogtreecommitdiffstats
path: root/rawmemrchr.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2018-08-19 13:23:21 +0200
committerMattias Andrée <maandree@kth.se>2018-08-19 13:23:21 +0200
commita405c151df74d4d3b4d06c38feff6458bef375a9 (patch)
tree7a06fe944e440134ab278623b909e73e9f83d3a7 /rawmemrchr.c
parentAdd str[r]n[case]str and str[n][case]cmpnul (diff)
downloadlibsimple-a405c151df74d4d3b4d06c38feff6458bef375a9.tar.gz
libsimple-a405c151df74d4d3b4d06c38feff6458bef375a9.tar.bz2
libsimple-a405c151df74d4d3b4d06c38feff6458bef375a9.tar.xz
Add str[n]caseeq[null] and some tests
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'rawmemrchr.c')
-rw-r--r--rawmemrchr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rawmemrchr.c b/rawmemrchr.c
index eb685cf..82a2d98 100644
--- a/rawmemrchr.c
+++ b/rawmemrchr.c
@@ -18,8 +18,8 @@ libsimple_rawmemrchr(const void *s_, int c, size_t n)
int
main(void)
{
- assert(!strcmp(libsimple_rawmemrchr("1234512345", '3', sizeof("1234512345") - 1), "345"));
- assert(!strcmp(libsimple_rawmemrchr("1234512345", '5', sizeof("1234512345") - 1), "5"));
+ assert(!strcmpnul(libsimple_rawmemrchr("1234512345", '3', sizeof("1234512345") - 1), "345"));
+ assert(!strcmpnul(libsimple_rawmemrchr("1234512345", '5', sizeof("1234512345") - 1), "5"));
return 0;
}