aboutsummaryrefslogtreecommitdiff
path: root/lib/netrc.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-11-07 09:21:35 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-11-07 09:21:35 +0000
commitcbd1a77ec24e397d05f20c6de106625676343c9d (patch)
treeb92440210b287a25e34293646d26fe124581c767 /lib/netrc.c
parent33f7ac06c3aaecf995360323d6f425e769e6fa79 (diff)
if () => if()
while () => while() and some other minor re-indentings
Diffstat (limited to 'lib/netrc.c')
-rw-r--r--lib/netrc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/netrc.c b/lib/netrc.c
index dc2e04294..78c117512 100644
--- a/lib/netrc.c
+++ b/lib/netrc.c
@@ -99,7 +99,7 @@ int Curl_parsenetrc(char *host,
char *override = curl_getenv("CURL_DEBUG_NETRC");
- if (override) {
+ if(override) {
fprintf(stderr, "NETRC: overridden " NETRC " file: %s\n", override);
netrcfile = override;
netrc_alloc = TRUE;
@@ -115,7 +115,7 @@ int Curl_parsenetrc(char *host,
else {
struct passwd *pw;
pw= getpwuid(geteuid());
- if (pw) {
+ if(pw) {
#ifdef VMS
home = decc$translate_vms(pw->pw_dir);
#else
@@ -148,7 +148,7 @@ int Curl_parsenetrc(char *host,
tok=strtok_r(netrcbuffer, " \t\n", &tok_buf);
while(!done && tok) {
- if (login[0] && password[0]) {
+ if(login[0] && password[0]) {
done=TRUE;
break;
}
@@ -179,7 +179,7 @@ int Curl_parsenetrc(char *host,
case HOSTVALID:
/* we are now parsing sub-keywords concerning "our" host */
if(state_login) {
- if (specific_login) {
+ if(specific_login) {
state_our_login = strequal(login, tok);
}
else {
@@ -191,7 +191,7 @@ int Curl_parsenetrc(char *host,
state_login=0;
}
else if(state_password) {
- if (state_our_login || !specific_login) {
+ if(state_our_login || !specific_login) {
strncpy(password, tok, PASSWORDSIZE-1);
#ifdef _NETRC_DEBUG
fprintf(stderr, "PASSWORD: %s\n", password);
@@ -212,7 +212,7 @@ int Curl_parsenetrc(char *host,
} /* switch (state) */
tok = strtok_r(NULL, " \t\n", &tok_buf);
- } /* while (tok) */
+ } /* while(tok) */
} /* while fgets() */
fclose(file);