summaryrefslogtreecommitdiff
path: root/games/hack/hack.save.c
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2014-03-11 08:05:16 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2014-03-11 08:05:16 +0000
commit3145208f57e40fe37fd3b241e2181882151661d6 (patch)
treed0aa8a2ee934e1ebcfb65a1e19ad2e0f66dfd7c8 /games/hack/hack.save.c
parenta1f4645b836500f68be0e58e76c610eb458db9d0 (diff)
Match bwrite()'s prototype with write()'s, zapping a lint comment
Delete casts to char* of arguments to bwrite() and free()
Diffstat (limited to 'games/hack/hack.save.c')
-rw-r--r--games/hack/hack.save.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/games/hack/hack.save.c b/games/hack/hack.save.c
index 204bfee6da0..e31b2b2d1f4 100644
--- a/games/hack/hack.save.c
+++ b/games/hack/hack.save.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hack.save.c,v 1.10 2014/03/11 07:41:10 guenther Exp $ */
+/* $OpenBSD: hack.save.c,v 1.11 2014/03/11 08:05:15 guenther Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -112,17 +112,17 @@ dosave0(int hu)
saveobjchn(fd, fcobj);
savemonchn(fd, fallen_down);
tmp = getuid();
- bwrite(fd, (char *) &tmp, sizeof tmp);
- bwrite(fd, (char *) &flags, sizeof(struct flag));
- bwrite(fd, (char *) &dlevel, sizeof dlevel);
- bwrite(fd, (char *) &maxdlevel, sizeof maxdlevel);
- bwrite(fd, (char *) &moves, sizeof moves);
- bwrite(fd, (char *) &u, sizeof(struct you));
+ bwrite(fd, &tmp, sizeof tmp);
+ bwrite(fd, &flags, sizeof(struct flag));
+ bwrite(fd, &dlevel, sizeof dlevel);
+ bwrite(fd, &maxdlevel, sizeof maxdlevel);
+ bwrite(fd, &moves, sizeof moves);
+ bwrite(fd, &u, sizeof(struct you));
if(u.ustuck)
- bwrite(fd, (char *) &(u.ustuck->m_id), sizeof u.ustuck->m_id);
- bwrite(fd, (char *) pl_character, sizeof pl_character);
- bwrite(fd, (char *) genocided, sizeof genocided);
- bwrite(fd, (char *) fut_geno, sizeof fut_geno);
+ bwrite(fd, &(u.ustuck->m_id), sizeof u.ustuck->m_id);
+ bwrite(fd, pl_character, sizeof pl_character);
+ bwrite(fd, genocided, sizeof genocided);
+ bwrite(fd, fut_geno, sizeof fut_geno);
savenames(fd);
for(tmp = 1; tmp <= maxdlevel; tmp++) {
extern int hackpid;
@@ -139,7 +139,7 @@ dosave0(int hu)
}
getlev(ofd, hackpid, tmp);
(void) close(ofd);
- bwrite(fd, (char *) &tmp, sizeof tmp); /* level number */
+ bwrite(fd, &tmp, sizeof tmp); /* level number */
savelev(fd,tmp); /* actual level */
(void) unlink(lock);
}