summaryrefslogtreecommitdiff
path: root/lib/netrc.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2012-06-12 22:46:14 +0200
committerDaniel Stenberg <daniel@haxx.se>2012-06-12 22:46:14 +0200
commit47c1bf9e439ee9dcc3cca263f5e21c3972fe64f3 (patch)
tree32b5cd06e8571e275644cd6b5f6da26ee7150782 /lib/netrc.c
parentd95b8e0627d875f264fb37e78b36122e00a10472 (diff)
downloadcurl-47c1bf9e439ee9dcc3cca263f5e21c3972fe64f3.tar.gz
netrc: remove dead code
Remove two states from the enum and the corresponding code for them as these states were never reached or used. (Spotted by a Coverity scan)
Diffstat (limited to 'lib/netrc.c')
-rw-r--r--lib/netrc.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/netrc.c b/lib/netrc.c
index 6764b974d..a99335167 100644
--- a/lib/netrc.c
+++ b/lib/netrc.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
@@ -51,10 +51,7 @@
enum host_lookup_state {
NOTHING,
HOSTFOUND, /* the 'machine' keyword was found */
- HOSTCOMPLETE, /* the machine name following the keyword was found too */
- HOSTVALID, /* this is "our" machine! */
-
- HOSTEND /* LAST enum */
+ HOSTVALID /* this is "our" machine! */
};
/*
@@ -174,10 +171,6 @@ int Curl_parsenetrc(const char *host,
state_our_login = FALSE;
}
break;
- case HOSTCOMPLETE:
- case HOSTEND:
- /* Should not be reached. */
- DEBUGASSERT(0);
} /* switch (state) */
tok = strtok_r(NULL, " \t\n", &tok_buf);