aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-08-05 11:15:57 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-08-05 11:15:57 +0000
commit20d8e32a58b30c7d2bb96fdc2b9cb0aaae3866de (patch)
treee4270909769c5f8e18f0e6d615fbda0a817a2e92 /src
parent33306b2749281626fe69bba57cb4871dd89cbaf7 (diff)
support blank arguments to options, each option should check for blank
ones themselves if they need to prevent this.
Diffstat (limited to 'src')
-rw-r--r--src/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index fe19d181b..998b1f3e4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -525,7 +525,7 @@ static void GetStr(char **string,
{
if(*string)
free(*string);
- if(value && *value)
+ if(value)
*string = strdup(value);
else
*string = NULL;
@@ -1131,7 +1131,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
nextarg=(char *)&parse[1]; /* this is the actual extra parameter */
singleopt=TRUE; /* don't loop anymore after this */
}
- else if((!nextarg || !*nextarg) && aliases[hit].extraparam) {
+ else if(!nextarg && aliases[hit].extraparam) {
return PARAM_REQUIRES_PARAMETER;
}
else if(nextarg && aliases[hit].extraparam)
@@ -1324,7 +1324,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
GetStr(&postdata, nextarg);
}
- if(config->postfields && *config->postfields) {
+ if(config->postfields) {
/* we already have a string, we append this one
with a separating &-letter */
char *oldpost=config->postfields;