summaryrefslogtreecommitdiff
path: root/tildexpand.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-06-23 21:20:34 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-06-23 21:20:34 +0000
commit2953d0fb4eda727762c52eaa005ca56c621d0d25 (patch)
treea85ab5637979dc8b2a134e51b4671a7c0df8fde4 /tildexpand.c
parente1c0912cb6af1d7ca8d260f9a3e21efdbe867050 (diff)
- deraadt@cvs.openbsd.org 2002/06/23 03:25:50
[tildexpand.c] KNF
Diffstat (limited to 'tildexpand.c')
-rw-r--r--tildexpand.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tildexpand.c b/tildexpand.c
index e89a7ade8..cbe981146 100644
--- a/tildexpand.c
+++ b/tildexpand.c
@@ -11,7 +11,7 @@
11 */ 11 */
12 12
13#include "includes.h" 13#include "includes.h"
14RCSID("$OpenBSD: tildexpand.c,v 1.12 2001/08/11 22:51:27 jakob Exp $"); 14RCSID("$OpenBSD: tildexpand.c,v 1.13 2002/06/23 03:25:50 deraadt Exp $");
15 15
16#include "xmalloc.h" 16#include "xmalloc.h"
17#include "log.h" 17#include "log.h"
@@ -67,6 +67,7 @@ tilde_expand_filename(const char *filename, uid_t my_uid)
67 if (len > MAXPATHLEN) 67 if (len > MAXPATHLEN)
68 fatal("Home directory too long (%d > %d", len-1, MAXPATHLEN-1); 68 fatal("Home directory too long (%d > %d", len-1, MAXPATHLEN-1);
69 expanded = xmalloc(len); 69 expanded = xmalloc(len);
70 snprintf(expanded, len, "%s%s%s", pw->pw_dir, strcmp(pw->pw_dir, "/") ? "/" : "", cp + 1); 70 snprintf(expanded, len, "%s%s%s", pw->pw_dir,
71 strcmp(pw->pw_dir, "/") ? "/" : "", cp + 1);
71 return expanded; 72 return expanded;
72} 73}