aboutsummaryrefslogtreecommitdiff
path: root/src/homedir.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2011-04-25 22:44:39 +0200
committerDaniel Stenberg <daniel@haxx.se>2011-04-27 09:09:35 +0200
commitaa87f0ab15c15784c4d7ee55e8c5972f5353b41e (patch)
tree822a24e4c999d30e3c9f75d0bc78a8721a174336 /src/homedir.c
parent6a6981503e509a2bfcec0763535c0f667e23ce38 (diff)
checksrc: whitespace and code style cleanup
Make everything adhere to the standards upheld by checksrc.pl and now run checksrc from the makefile on debug builds.
Diffstat (limited to 'src/homedir.c')
-rw-r--r--src/homedir.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/homedir.c b/src/homedir.c
index ab1d36946..52f69c7ee 100644
--- a/src/homedir.c
+++ b/src/homedir.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -54,23 +54,23 @@ char *GetEnv(const char *variable, char do_expand)
* started. Don't accept truncated results (i.e. rc >= sizeof(buf1)). */
rc = GetEnvironmentVariable(variable, buf1, sizeof(buf1));
- if (rc > 0 && rc < sizeof(buf1)) {
+ if(rc > 0 && rc < sizeof(buf1)) {
env = buf1;
variable = buf1;
}
- if (do_expand && strchr(variable,'%')) {
+ if(do_expand && strchr(variable,'%')) {
/* buf2 == variable if not expanded */
rc = ExpandEnvironmentStrings (variable, buf2, sizeof(buf2));
- if (rc > 0 && rc < sizeof(buf2) &&
- !strchr(buf2,'%')) /* no vars still unexpanded */
+ if(rc > 0 && rc < sizeof(buf2) &&
+ !strchr(buf2,'%')) /* no vars still unexpanded */
env = buf2;
}
#else
(void)do_expand;
#ifdef __VMS
env = getenv(variable);
- if (env && strcmp("HOME",variable) == 0) {
- env = decc_translate_vms(env);
+ if(env && strcmp("HOME",variable) == 0) {
+ env = decc_translate_vms(env);
}
#else
/* no length control */
@@ -97,13 +97,13 @@ char *homedir(void)
{
struct passwd *pw = getpwuid(geteuid());
- if (pw) {
+ if(pw) {
#ifdef __VMS
home = decc_translate_vms(pw->pw_dir);
#else
home = pw->pw_dir;
#endif
- if (home && home[0])
+ if(home && home[0])
home = strdup(home);
else
home = NULL;