sbase

suckless unix tools
git clone git://git.2f30.org/sbase
Log | Files | Refs | README | LICENSE

commit af4af8a0d8882f28ec19326a88614812f40578eb
parent 0fcb939408ceeeae238e596c6f4ef06193b36949
Author: sin <sin@2f30.org>
Date:   Fri, 19 Jul 2013 17:08:15 +0100

Change sprintf to snprintf

cal.c:40: warning: sprintf() is often misused, please use snprintf()

Diffstat:
Mcal.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cal.c b/cal.c @@ -37,7 +37,7 @@ drawcal(int year, int month, int day, int ncols, int nmons, int fday) cur = moff % 12; yoff = year + moff / 12; - sprintf(str, "%s %d", smon[cur], yoff); + snprintf(str, sizeof(str), "%s %d", smon[cur], yoff); printf("%-20s ", str); count[i] = 1; }