ANSIfy
This commit is contained in:
parent
b0c4d54ee9
commit
ee20410a5e
|
@ -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 @@ 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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue