-/* $NetBSD: hack.end.c,v 1.14 2010/02/03 15:34:38 roy Exp $ */
+/* $NetBSD: hack.end.c,v 1.18 2020/02/07 20:34:18 fox Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.end.c,v 1.14 2010/02/03 15:34:38 roy Exp $");
+__RCSID("$NetBSD: hack.end.c,v 1.18 2020/02/07 20:34:18 fox Exp $");
#endif /* not lint */
#include <signal.h>
}
if (*st1 == 'c')
killer = st1; /* after outrip() */
- settty((char *) 0); /* does a clear_screen() */
+ settty(NULL); /* does a clear_screen() */
if (!done_stopprint)
printf("Goodbye %s %s...\n\n", pl_character, plname);
{
exit(0);
}
-#define newttentry() (struct toptenentry *) alloc(sizeof(struct toptenentry))
+#define newttentry() ((struct toptenentry *) alloc(sizeof(struct toptenentry)))
#define NAMSZ 8
#define DTHSZ 40
#define PERSMAX 1
t0->plchar = pl_character[0];
t0->sex = (flags.female ? 'F' : 'M');
t0->uid = uid;
- (void) strncpy(t0->name, plname, NAMSZ);
+ (void) strlcpy(t0->name, plname, NAMSZ);
(t0->name)[NAMSZ] = 0;
(void) strncpy(t0->death, killer, DTHSZ);
(t0->death)[DTHSZ] = 0;
break;
}
}
- free((char *) t1);
+ free(t1);
}
#ifdef nonsense
totchars[totcharct] = 0;