From 34ba9fa9083c655e5ba06cecd46da157eb07d980 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Tue, 21 Jul 2009 20:23:08 +0200 Subject: Correctly handle the order of items --- src/general.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/general.c') diff --git a/src/general.c b/src/general.c index 4016ecd..4c110e4 100644 --- a/src/general.c +++ b/src/general.c @@ -63,8 +63,8 @@ void die(const char *fmt, ...) { * Otherwise, the buffer size would have to be increased. * */ -char *concat(const char *str1, const char *str2) { - static char concatbuf[32]; - (void)snprintf(concatbuf, sizeof(concatbuf), "%s%s", str1, str2); - return concatbuf; +char *order_to_str(int number, char *name) { + static char buf[32]; + (void)snprintf(buf, sizeof(buf), "%d%s", number, name); + return buf; } -- cgit v1.2.3