-/* $NetBSD: damage.c,v 1.6 2003/08/07 09:37:50 agc Exp $ */
+/* $NetBSD: damage.c,v 1.8 2009/05/24 21:44:56 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
#if 0
static char sccsid[] = "@(#)damage.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: damage.c,v 1.6 2003/08/07 09:37:50 agc Exp $");
+__RCSID("$NetBSD: damage.c,v 1.8 2009/05/24 21:44:56 dholland Exp $");
#endif
#endif /* not lint */
**
** Note that the repair of the device occurs on a DATE, meaning
** that the dock() and undock() have to reschedule the event.
+**
+** dev1 -- device index
+** dam -- time to repair
*/
void
-damage(dev1, dam)
-int dev1; /* device index */
-double dam; /* time to repair */
+damage(int dev1, double dam)
{
int i;
struct event *e;
dam *= Param.dockfac;
/* set the damage flag */
f = damaged(dev);
- if (!f)
- {
+ if (!f) {
/* new damages -- schedule a fix */
schedule(E_FIXDV, dam, 0, 0, dev);
return;
}
/* device already damaged -- add to existing damages */
/* scan for old damages */
- for (i = 0; i < MAXEVENTS; i++)
- {
+ for (i = 0; i < MAXEVENTS; i++) {
e = &Event[i];
if (e->evcode != E_FIXDV || e->systemname != dev)
continue;