From ee20410a5ec7816aaf0480255d5a6826770cbb12 Mon Sep 17 00:00:00 2001 From: aymeric Date: Thu, 26 Jun 2003 20:45:29 +0000 Subject: [PATCH] ANSIfy --- sys/arch/ofppc/stand/ofwboot/alloc.c | 14 ++++++-------- sys/arch/ofppc/stand/ofwboot/netif_of.c | 24 +++++++----------------- 2 files changed, 13 insertions(+), 25 deletions(-) diff --git a/sys/arch/ofppc/stand/ofwboot/alloc.c b/sys/arch/ofppc/stand/ofwboot/alloc.c index def93e98b456..0e6977247b55 100644 --- a/sys/arch/ofppc/stand/ofwboot/alloc.c +++ b/sys/arch/ofppc/stand/ofwboot/alloc.c @@ -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 +#include "alloc.h" #include "openfirm.h" /* @@ -126,10 +127,9 @@ LIST_HEAD(, ml) allocatedlist = LIST_HEAD_INITIALIZER(allocatedlist); #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 @@ alloc(size) } 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 @@ free(ptr, size) } void -freeall() +freeall(void) { #ifdef __notyet__ /* Firmware bug ?! */ struct ml *m; diff --git a/sys/arch/ofppc/stand/ofwboot/netif_of.c b/sys/arch/ofppc/stand/ofwboot/netif_of.c index 9259b49cb2cc..d4d9aff85b13 100644 --- a/sys/arch/ofppc/stand/ofwboot/netif_of.c +++ b/sys/arch/ofppc/stand/ofwboot/netif_of.c @@ -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 @@ socktodesc(sock) } 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 @@ netif_of_open(op) } void -netif_of_close(fd) - int fd; +netif_of_close(int fd) { struct iodesc *io; @@ -131,10 +128,7 @@ netif_of_close(fd) * 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 @@ netif_put(desc, pkt, len) * 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 @@ netif_get(desc, pkt, maxlen, timo) * Shouldn't really be here, but is used solely for networking, so... */ time_t -getsecs() +getsecs(void) { return OF_milliseconds() / 1000; }