diff options
author | 2015-09-27 05:13:11 +0000 | |
---|---|---|
committer | 2015-09-27 05:13:11 +0000 | |
commit | 911134d2940395eae97932b9f9c69e48c962c4de (patch) | |
tree | aa0edd5c9e5a2096908820a81a8bf6cdefc85c11 /games/hack/hack.potion.c | |
parent | Delete obsolete lint comments (diff) | |
download | wireguard-openbsd-911134d2940395eae97932b9f9c69e48c962c4de.tar.xz wireguard-openbsd-911134d2940395eae97932b9f9c69e48c962c4de.zip |
Annotate funcs with __attribute__((printf(...))) and clean up the fallout:
* lots of foo(str) --> foo("%s", str) transformations
* one totally insane foo(fmt, ap) --> vfoo(fmt, ap) conversion: how did
this ever work?
* prefer const char[] over char* for static format strings, as it lets
gcc check the format and eliminates an unnecessary pointer
ok beck@
Diffstat (limited to 'games/hack/hack.potion.c')
-rw-r--r-- | games/hack/hack.potion.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/games/hack/hack.potion.c b/games/hack/hack.potion.c index b23962f2c40..8238c02a1c3 100644 --- a/games/hack/hack.potion.c +++ b/games/hack/hack.potion.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hack.potion.c,v 1.5 2009/10/27 23:59:25 deraadt Exp $ */ +/* $OpenBSD: hack.potion.c,v 1.6 2015/09/27 05:13:11 guenther Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -273,7 +273,7 @@ strange_feeling(struct obj *obj, char *txt) if(flags.beginner) pline("You have a strange feeling for a moment, then it passes."); else - pline(txt); + pline("%s", txt); if(!objects[obj->otyp].oc_name_known && !objects[obj->otyp].oc_uname) docall(obj); useup(obj); |