Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/ofppc/stand/ofwboot ANSIfy



details:   https://anonhg.NetBSD.org/src/rev/9a1572527576
branches:  trunk
changeset: 548437:9a1572527576
user:      aymeric <aymeric%NetBSD.org@localhost>
date:      Thu Jun 26 20:45:29 2003 +0000

description:
ANSIfy

diffstat:

 sys/arch/ofppc/stand/ofwboot/alloc.c    |  14 ++++++--------
 sys/arch/ofppc/stand/ofwboot/netif_of.c |  24 +++++++-----------------
 2 files changed, 13 insertions(+), 25 deletions(-)

diffs (123 lines):

diff -r c82fa25c203d -r 9a1572527576 sys/arch/ofppc/stand/ofwboot/alloc.c
--- a/sys/arch/ofppc/stand/ofwboot/alloc.c      Thu Jun 26 20:44:51 2003 +0000
+++ b/sys/arch/ofppc/stand/ofwboot/alloc.c      Thu Jun 26 20:45:29 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: alloc.c,v 1.4 2001/10/23 03:31:26 thorpej Exp $        */
+/*     $NetBSD: alloc.c,v 1.5 2003/06/26 20:45:29 aymeric Exp $        */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -88,6 +88,7 @@
 
 #include <lib/libsa/stand.h>
 
+#include "alloc.h"
 #include "openfirm.h"
 
 /*
@@ -126,10 +127,9 @@
 #define        OVERHEAD        ALIGN(sizeof (struct ml))       /* shorthand */
 
 void *
-alloc(size)
-       unsigned size;
+alloc(unsigned size)
 {
-       struct ml *f, *bestf;
+       struct ml *f, *bestf = NULL;
 #ifndef ALLOC_FIRST_FIT
        unsigned bestsize = 0xffffffff; /* greater than any real size */
 #endif
@@ -212,9 +212,7 @@
 }
 
 void
-free(ptr, size)
-       void *ptr;
-       unsigned size;  /* only for consistenct check */
+free(void *ptr, unsigned size)
 {
        register struct ml *a = (struct ml *)((char*)ptr - OVERHEAD);
 
@@ -233,7 +231,7 @@
 }
 
 void
-freeall()
+freeall(void)
 {
 #ifdef __notyet__              /* Firmware bug ?! */
        struct ml *m;
diff -r c82fa25c203d -r 9a1572527576 sys/arch/ofppc/stand/ofwboot/netif_of.c
--- a/sys/arch/ofppc/stand/ofwboot/netif_of.c   Thu Jun 26 20:44:51 2003 +0000
+++ b/sys/arch/ofppc/stand/ofwboot/netif_of.c   Thu Jun 26 20:45:29 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netif_of.c,v 1.6 2003/03/13 15:36:06 drochner Exp $    */
+/*     $NetBSD: netif_of.c,v 1.7 2003/06/26 20:45:29 aymeric Exp $     */
 
 /*
  * Copyright (C) 1995 Wolfgang Solfrank.
@@ -59,8 +59,7 @@
 static struct iodesc sdesc;
 
 struct iodesc *
-socktodesc(sock)
-       int sock;
+socktodesc(int sock)
 {
        if (sock != 0)
                return NULL;
@@ -68,8 +67,7 @@
 }
 
 int
-netif_of_open(op)
-       struct of_dev *op;
+netif_of_open(struct of_dev *op)
 {
        struct iodesc *io;
        int fd, error;
@@ -102,8 +100,7 @@
 }
 
 void
-netif_of_close(fd)
-       int fd;
+netif_of_close(int fd)
 {
        struct iodesc *io;
 
@@ -131,10 +128,7 @@
  * Return the length sent (or -1 on error).
  */
 ssize_t
-netif_put(desc, pkt, len)
-       struct iodesc *desc;
-       void *pkt;
-       size_t len;
+netif_put(struct iodesc *desc, void *pkt, size_t len)
 {
        struct of_dev *op;
        ssize_t rv;
@@ -177,11 +171,7 @@
  * Return the total length received (or -1 on error).
  */
 ssize_t
-netif_get(desc, pkt, maxlen, timo)
-       struct iodesc *desc;
-       void *pkt;
-       size_t maxlen;
-       time_t timo;
+netif_get(struct iodesc *desc, void *pkt, size_t maxlen, time_t timo)
 {
        struct of_dev *op;
        int tick0, tmo_ms;
@@ -226,7 +216,7 @@
  * Shouldn't really be here, but is used solely for networking, so...
  */
 time_t
-getsecs()
+getsecs(void)
 {
        return OF_milliseconds() / 1000;
 }



Home | Main Index | Thread Index | Old Index