aboutsummaryrefslogtreecommitdiff
path: root/lib/formdata.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-10-01 11:20:38 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-10-01 11:20:38 +0000
commitec4da97a35fb285c4316f8b4017f84cba5d494b7 (patch)
treedd435106089f65d6421902cadd5f2581783a2c64 /lib/formdata.c
parentbb48ccedd7c8eb9eeab1d4d900f011ebdda1eb4b (diff)
fixed the basename() replacement, reported by Gisle
Diffstat (limited to 'lib/formdata.c')
-rw-r--r--lib/formdata.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/formdata.c b/lib/formdata.c
index 798303d3a..affaf4b6d 100644
--- a/lib/formdata.c
+++ b/lib/formdata.c
@@ -944,9 +944,10 @@ char *basename(char *path)
if(s1 && s2) {
path = (s1 > s2? s1 : s2)+1;
}
- else {
- path = (s1 ? s1 : s2)+1;
- }
+ else if(s1)
+ path = s1 + 1;
+ else if(s2)
+ path = s1 + 1;
return path;
}