From ee8602a486429bba681dfd58b15a01d9b4d49746 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Fri, 18 Nov 2011 12:18:23 +0100 Subject: [PATCH] minor bugfixes caught by clang warnings --- lib/libcurses/addbytes.c | 2 +- lib/nbsd_libc/sys-minix/pread.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libcurses/addbytes.c b/lib/libcurses/addbytes.c index 5945c2c38..971772d22 100644 --- a/lib/libcurses/addbytes.c +++ b/lib/libcurses/addbytes.c @@ -157,7 +157,7 @@ __waddbytes(WINDOW *win, const char *bytes, int count, attr_t attr) /* not a valid conversion just eat a char */ wc = *bytes; n = 1; - (void)memset(&st, 0, sizeof(&st)); + (void)memset(&st, 0, sizeof(st)); } else if (wc == 0) { break; } diff --git a/lib/nbsd_libc/sys-minix/pread.c b/lib/nbsd_libc/sys-minix/pread.c index 5da762536..f2b751544 100644 --- a/lib/nbsd_libc/sys-minix/pread.c +++ b/lib/nbsd_libc/sys-minix/pread.c @@ -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, where, SEEK_SET, NULL) < 0) return(-1); if ((r = read(fd, buffer, nbytes)) < 0) { - int e ; errno; + int e = errno; lseek64(fd, here, SEEK_SET, NULL); errno = e; return(-1);