diff options
author | 2017-04-08 22:59:09 +0000 | |
---|---|---|
committer | 2017-04-08 22:59:09 +0000 | |
commit | dc90561245776245409f2a3ab0584ef2437109fb (patch) | |
tree | 1ba564cb4c65884ec6cd89f093aad53690891b09 | |
parent | format string is better be literal (diff) | |
download | wireguard-openbsd-dc90561245776245409f2a3ab0584ef2437109fb.tar.xz wireguard-openbsd-dc90561245776245409f2a3ab0584ef2437109fb.zip |
snprintf() format string should be literal
avoid compiler silly warnings
sure deraadt@
-rw-r--r-- | games/hack/hack.end.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/games/hack/hack.end.c b/games/hack/hack.end.c index e4d4c4c5f18..d628148a8cd 100644 --- a/games/hack/hack.end.c +++ b/games/hack/hack.end.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hack.end.c,v 1.16 2016/01/09 21:54:11 mestre Exp $ */ +/* $OpenBSD: hack.end.c,v 1.17 2017/04/08 22:59:09 gsoares Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -536,7 +536,7 @@ outentry(int rank, struct toptenentry *t1, int so) char hpbuf[10]; int hppos; bp = eos(linebuf); - snprintf(hpbuf, sizeof hpbuf, (t1->hp > 0) ? itoa(t1->hp) : "-"); + snprintf(hpbuf, sizeof hpbuf, "%s", (t1->hp > 0) ? itoa(t1->hp) : "-"); hppos = COLNO - 7 - strlen(hpbuf); if(bp <= linebuf + hppos) { while(bp < linebuf + hppos) *bp++ = ' '; |