lint
authorMike Karels <karels@ucbvax.Berkeley.EDU>
Fri, 27 May 1988 00:01:38 +0000 (16:01 -0800)
committerMike Karels <karels@ucbvax.Berkeley.EDU>
Fri, 27 May 1988 00:01:38 +0000 (16:01 -0800)
SCCS-vsn: sys/kern/init_main.c 7.6
SCCS-vsn: sys/kern/tty.c 7.12
SCCS-vsn: sys/kern/uipc_socket.c 7.9

usr/src/sys/kern/init_main.c
usr/src/sys/kern/tty.c
usr/src/sys/kern/uipc_socket.c

index 730cf82..9090f33 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)init_main.c 7.5 (Berkeley) %G%
+ *     @(#)init_main.c 7.6 (Berkeley) %G%
  */
 
 #include "../machine/pte.h"
  */
 
 #include "../machine/pte.h"
@@ -248,6 +248,7 @@ swapinit()
        register int i;
        register struct buf *sp = swbuf;
        struct swdevt *swp;
        register int i;
        register struct buf *sp = swbuf;
        struct swdevt *swp;
+       int error;
 
        /*
         * Count swap devices, and adjust total swap space available.
 
        /*
         * Count swap devices, and adjust total swap space available.
@@ -272,7 +273,10 @@ swapinit()
         */
        if (nswdev > 1)
                maxpgio = (maxpgio * (2 * nswdev - 1)) / 2;
         */
        if (nswdev > 1)
                maxpgio = (maxpgio * (2 * nswdev - 1)) / 2;
-       swfree(0);
+       if (error = swfree(0)) {
+               printf("swfree errno %d\n", error);     /* XXX */
+               panic("swapinit swfree 0");
+       }
 
        /*
         * Now set up swap buffer headers.
 
        /*
         * Now set up swap buffer headers.
index 60adedf..b4a1086 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)tty.c       7.11 (Berkeley) %G%
+ *     @(#)tty.c       7.12 (Berkeley) %G%
  */
 
 #include "../machine/reg.h"
  */
 
 #include "../machine/reg.h"
@@ -1495,8 +1495,8 @@ loop:
                        if (!(tp->t_oflag&OPOST))
                                ce = cc;
                        else {
                        if (!(tp->t_oflag&OPOST))
                                ce = cc;
                        else {
-                               ce = cc - scanc((unsigned)cc, (caddr_t)cp,
-                                  (caddr_t)partab, 077);
+                               ce = cc - scanc((unsigned)cc, (u_char *)cp,
+                                  (u_char *)partab, 077);
                                /*
                                 * If ce is zero, then we're processing
                                 * a special character through ttyoutput.
                                /*
                                 * If ce is zero, then we're processing
                                 * a special character through ttyoutput.
index 6916d2d..e83168b 100644 (file)
@@ -671,8 +671,9 @@ sosetopt(so, level, optname, m0)
 
                        case SO_SNDBUF:
                        case SO_RCVBUF:
 
                        case SO_SNDBUF:
                        case SO_RCVBUF:
-                               if (sbreserve(optname == SO_SNDBUF ? &so->so_snd :
-                                   &so->so_rcv, *mtod(m, int *)) == 0) {
+                               if (sbreserve(optname == SO_SNDBUF ?
+                                   &so->so_snd : &so->so_rcv,
+                                   (u_long) *mtod(m, int *)) == 0) {
                                        error = ENOBUFS;
                                        goto bad;
                                }
                                        error = ENOBUFS;
                                        goto bad;
                                }