aboutsummaryrefslogtreecommitdiff
path: root/src/tool_paramhlp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tool_paramhlp.c')
-rw-r--r--src/tool_paramhlp.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/tool_paramhlp.c b/src/tool_paramhlp.c
index 86b8a1df5..46e926952 100644
--- a/src/tool_paramhlp.c
+++ b/src/tool_paramhlp.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, 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
@@ -365,14 +365,14 @@ ParameterError str2offset(curl_off_t *val, const char *str)
return PARAM_BAD_NUMERIC;
}
-ParameterError checkpasswd(const char *kind, /* for what purpose */
- char **userpwd) /* pointer to allocated string */
+CURLcode checkpasswd(const char *kind, /* for what purpose */
+ char **userpwd) /* pointer to allocated string */
{
char *psep;
char *osep;
if(!*userpwd)
- return PARAM_OK;
+ return CURLE_OK;
/* Attempt to find the password separator */
psep = strchr(*userpwd, ':');
@@ -408,14 +408,15 @@ ParameterError checkpasswd(const char *kind, /* for what purpose */
passwdlen + 1 + /* an extra for the colon */
userlen + 1); /* an extra for the zero */
if(!passptr)
- return PARAM_NO_MEM;
+ return CURLE_OUT_OF_MEMORY;
/* append the password separated with a colon */
passptr[userlen] = ':';
memcpy(&passptr[userlen+1], passwd, passwdlen+1);
*userpwd = passptr;
}
- return PARAM_OK;
+
+ return CURLE_OK;
}
ParameterError add2list(struct curl_slist **list, const char *ptr)