summaryrefslogtreecommitdiff
path: root/lib/netrc.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-04-14 12:53:53 +0000
committerYang Tse <yangsita@gmail.com>2009-04-14 12:53:53 +0000
commitc382c550e7d8ad54d2c35b0fea9d0eef09ff3a25 (patch)
tree4a55cc0951de068e16c9e016bdb8b70fde9c6473 /lib/netrc.c
parentc663494c69e81f8d88ccf8dad7e4ae3ef726e9d8 (diff)
downloadcurl-c382c550e7d8ad54d2c35b0fea9d0eef09ff3a25.tar.gz
fix compiler warning: implicit conversion shortens 64-bit value into a 32-bit value
Diffstat (limited to 'lib/netrc.c')
-rw-r--r--lib/netrc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/netrc.c b/lib/netrc.c
index 221d21506..4fefefc6e 100644
--- a/lib/netrc.c
+++ b/lib/netrc.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2009, 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
@@ -144,8 +144,9 @@ int Curl_parsenetrc(const char *host,
char *tok_buf;
bool done=FALSE;
char netrcbuffer[256];
-
- while(!done && fgets(netrcbuffer, sizeof(netrcbuffer), file)) {
+ int netrcbuffsize = (int)sizeof(netrcbuffer);
+
+ while(!done && fgets(netrcbuffer, netrcbuffsize, file)) {
tok=strtok_r(netrcbuffer, " \t\n", &tok_buf);
while(!done && tok) {