Piotr Caban (@piotr) commented about dlls/msvcrt/tests/string.c:
- memset(buf, 0xff, sizeof(buf));
- errno = 0xdeadbeef;
- ret = _mbsncpy(NULL, mbstring, 1);
- ok(ret == NULL, "_mbsncpy returned %p, expected NULL\n", ret);
- ok(errno == EINVAL, "_mbsncpy returned %d\n", errno);
- memset(buf, 0xff, sizeof(buf));
- errno = 0xdeadbeef;
- ret = _mbsncpy(buf, NULL, 1);
- ok(ret == NULL, "_mbsncpy returned %p, expected NULL\n", ret);
- ok(errno == EINVAL, "_mbsncpy returned %d\n", errno);
- memset(buf, 0xff, sizeof(buf));
- ret = _mbsncpy(NULL, mbstring, 0);
- ok(ret == NULL, "_mbsncpy returned %p, expected %p\n", ret, buf);
Did you forget to test `errno`? Also it doesn't make sense to memset `buf` since it's not used. Please also update ok message.