mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-03 21:30:14 -05:00
Make sgetbs() return the number of characters read on success
This commit is contained in:
parent
97419fb67f
commit
969cb5ca31
5 changed files with 35 additions and 5 deletions
|
|
@ -144,7 +144,7 @@ void test(int advise_mode)
|
|||
char copy[STR_MAX];
|
||||
memset(str, ' ' + j, j - 1);
|
||||
str[j - 1] = 0;
|
||||
if (sgetbs(s, copy, sizeof(copy)) != 0 || strcmp(copy, str) != 0) {
|
||||
if (sgetbs(s, copy, sizeof(copy)) != (ssize_t)(j - 1) || strcmp(copy, str) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue