diff --git a/src/general/ipc_msg.c b/src/general/ipc_msg.c index cbff705..dee4b82 100644 --- a/src/general/ipc_msg.c +++ b/src/general/ipc_msg.c @@ -102,6 +102,9 @@ static void rcv() errno = 0; if (msgrcv(qid, &msg, sizeof msg.data, msgtyp, MSG_NOERROR|IPC_NOWAIT) != -1 || errno != ENOMSG) error("msgrcv should have failed when ther is no msg with ENOMSG, got %s\n", strerror(errno)); + + /* cleanup */ + T(msgctl(qid, IPC_RMID, 0)); } int main(void) diff --git a/src/general/string_strchr.c b/src/general/string_strchr.c index 9ee4ca8..c05d881 100644 --- a/src/general/string_strchr.c +++ b/src/general/string_strchr.c @@ -38,6 +38,12 @@ int main(void) T("a", 'a', 0) T("a", 'a'+256, 0) T("a", 0, 1) + T("ab", 'b', 1) + T("aab", 'b', 2) + T("aaab", 'b', 3) + T("aaaab", 'b', 4) + T("aaaaab", 'b', 5) + T("aaaaaab", 'b', 6) T("abc abc", 'c', 2) T(s, 1, 0) T(s, 2, 1) diff --git a/src/general/string_strcspn.c b/src/general/string_strcspn.c index 39b907e..87fcd10 100644 --- a/src/general/string_strcspn.c +++ b/src/general/string_strcspn.c @@ -25,6 +25,7 @@ int main(void) T("a", "", 1) T("", "a", 0) T("abc", "cde", 2) + T("abc", "ccc", 2) T("abc", a, 0) T("\xff\x80 abc", a, 2) T(s, "\xff", 254)