]> Zhao Yanbai Git Server - minix.git/commitdiff
minor bugfixes caught by clang warnings
authorBen Gras <ben@minix3.org>
Fri, 18 Nov 2011 11:18:23 +0000 (12:18 +0100)
committerBen Gras <ben@minix3.org>
Fri, 18 Nov 2011 11:18:23 +0000 (12:18 +0100)
lib/libcurses/addbytes.c
lib/nbsd_libc/sys-minix/pread.c

index 5945c2c38861ad6aa8bfc2220436d27190bcae8c..971772d222277314ddbb45e0edce7f5f8c6c20f4 100644 (file)
@@ -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;
                }
index 5da76253626f2d5f7eb44583e649a3e9438e2a46..f2b751544e78ffc9bf1f2198c05d2b5846af484c 100644 (file)
@@ -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);