projects
/
platform
/
upstream
/
curl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb48cce
)
fixed the basename() replacement, reported by Gisle
author
Daniel Stenberg
<daniel@haxx.se>
Fri, 1 Oct 2004 11:20:38 +0000
(11:20 +0000)
committer
Daniel Stenberg
<daniel@haxx.se>
Fri, 1 Oct 2004 11:20:38 +0000
(11:20 +0000)
lib/formdata.c
patch
|
blob
|
history
diff --git
a/lib/formdata.c
b/lib/formdata.c
index
798303d
..
affaf4b
100644
(file)
--- 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;
}