minor bugfixes caught by clang warnings
This commit is contained in:
parent
79285c3664
commit
ee8602a486
2 changed files with 2 additions and 2 deletions
|
@ -157,7 +157,7 @@ __waddbytes(WINDOW *win, const char *bytes, int count, attr_t attr)
|
||||||
/* not a valid conversion just eat a char */
|
/* not a valid conversion just eat a char */
|
||||||
wc = *bytes;
|
wc = *bytes;
|
||||||
n = 1;
|
n = 1;
|
||||||
(void)memset(&st, 0, sizeof(&st));
|
(void)memset(&st, 0, sizeof(st));
|
||||||
} else if (wc == 0) {
|
} else if (wc == 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ ssize_t pread64(int fd, void *buffer, size_t nbytes, u64_t where)
|
||||||
if (lseek64(fd, make64(0,0), SEEK_CUR, &here) < 0) return(-1);
|
if (lseek64(fd, make64(0,0), SEEK_CUR, &here) < 0) return(-1);
|
||||||
if (lseek64(fd, where, SEEK_SET, NULL) < 0) return(-1);
|
if (lseek64(fd, where, SEEK_SET, NULL) < 0) return(-1);
|
||||||
if ((r = read(fd, buffer, nbytes)) < 0) {
|
if ((r = read(fd, buffer, nbytes)) < 0) {
|
||||||
int e ; errno;
|
int e = errno;
|
||||||
lseek64(fd, here, SEEK_SET, NULL);
|
lseek64(fd, here, SEEK_SET, NULL);
|
||||||
errno = e;
|
errno = e;
|
||||||
return(-1);
|
return(-1);
|
||||||
|
|
Loading…
Reference in a new issue