diff options
author | Russ Allbery <rra@stanford.edu> | 2013-02-27 14:54:05 -0800 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2013-02-27 16:52:57 -0800 |
commit | 93e566f6f9ae8a767d2188ad1fb1520c9c2d303a (patch) | |
tree | 470252615c14d94be07cf1c985cca4cee54c5b8e /client/file.c | |
parent | 4d11772001f65264bf714711550acdbb05900f4c (diff) |
Drop use of concat in favor of xasprintf
Change-Id: I6a84920b0c0dc1849af8a34ecf8f3fb70b45e17c
Reviewed-on: https://gerrit.stanford.edu/843
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
Diffstat (limited to 'client/file.c')
-rw-r--r-- | client/file.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/client/file.c b/client/file.c index c171969..511c995 100644 --- a/client/file.c +++ b/client/file.c @@ -16,7 +16,6 @@ #include <sys/stat.h> #include <client/internal.h> -#include <util/concat.h> #include <util/messages.h> #include <util/xmalloc.h> @@ -83,8 +82,8 @@ write_file(const char *name, const void *data, size_t length) { char *temp, *backup; - temp = concat(name, ".new", (char *) 0); - backup = concat(name, ".bak", (char *) 0); + xasprintf(&temp, "%s.new", name); + xasprintf(&backup, "%s.bak", name); overwrite_file(temp, data, length); if (access(name, F_OK) == 0) { if (access(backup, F_OK) == 0) |