[hackers] [scc] [driver] fix variables order in outfname() printf() || Quentin Rameau

From: <git_AT_suckless.org>
Date: Mon, 4 Jul 2016 16:53:18 +0200 (CEST)

commit adb54b6ee21d7b6c56089de7421f5e731c11912d
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Mon Jul 4 16:15:45 2016 +0200
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Mon Jul 4 16:15:45 2016 +0200

    [driver] fix variables order in outfname() printf()

diff --git a/driver/posix/scc.c b/driver/posix/scc.c
index b1ffc02..f82422a 100644
--- a/driver/posix/scc.c
+++ b/driver/posix/scc.c
_AT_@ -159,7 +159,7 @@ outfname(char *path, char *type)
 
         newsz = pathln + 1 + strlen(type) + 1;
         new = xmalloc(newsz);
- n = snprintf(new, newsz, "%.*s%c%s", path, pathln, sep, type);
+ n = snprintf(new, newsz, "%.*s%c%s", pathln, path, sep, type);
         if (n < 0 || n >= newsz)
                 die("scc: wrong output filename");
         if ((tmpfd = mkstemp(new)) < 0 && errno != EINVAL)
Received on Mon Jul 04 2016 - 16:53:18 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 04 2016 - 17:00:17 CEST