Fossil SCM

Remove while(1) loop made redundant by [239b4c1362].

preben 2023-09-27 19:43 trunk
Commit f36e8886c0092f2cff651f241586d4827700ee1fee39ea9d9a4ff1dff5464fcc
1 file changed +7 -10
+7 -10
--- src/main.c
+++ src/main.c
@@ -2004,20 +2004,17 @@
20042004
}
20052005
20062006
/* Make g.zPath point to the first element of the path. Make
20072007
** g.zExtra point to everything past that point.
20082008
*/
2009
- while(1){
2010
- g.zPath = &zPath[1];
2011
- for(i=1; zPath[i] && zPath[i]!='/'; i++){}
2012
- if( zPath[i]=='/' ){
2013
- zPath[i] = 0;
2014
- g.zExtra = &zPath[i+1];
2015
- }else{
2016
- g.zExtra = 0;
2017
- }
2018
- break;
2009
+ g.zPath = &zPath[1];
2010
+ for(i=1; zPath[i] && zPath[i]!='/'; i++){}
2011
+ if( zPath[i]=='/' ){
2012
+ zPath[i] = 0;
2013
+ g.zExtra = &zPath[i+1];
2014
+ }else{
2015
+ g.zExtra = 0;
20192016
}
20202017
if( g.zExtra ){
20212018
/* CGI parameters get this treatment elsewhere, but places like getfile
20222019
** will use g.zExtra directly.
20232020
** Reminder: the login mechanism uses 'name' differently, and may
20242021
--- src/main.c
+++ src/main.c
@@ -2004,20 +2004,17 @@
2004 }
2005
2006 /* Make g.zPath point to the first element of the path. Make
2007 ** g.zExtra point to everything past that point.
2008 */
2009 while(1){
2010 g.zPath = &zPath[1];
2011 for(i=1; zPath[i] && zPath[i]!='/'; i++){}
2012 if( zPath[i]=='/' ){
2013 zPath[i] = 0;
2014 g.zExtra = &zPath[i+1];
2015 }else{
2016 g.zExtra = 0;
2017 }
2018 break;
2019 }
2020 if( g.zExtra ){
2021 /* CGI parameters get this treatment elsewhere, but places like getfile
2022 ** will use g.zExtra directly.
2023 ** Reminder: the login mechanism uses 'name' differently, and may
2024
--- src/main.c
+++ src/main.c
@@ -2004,20 +2004,17 @@
2004 }
2005
2006 /* Make g.zPath point to the first element of the path. Make
2007 ** g.zExtra point to everything past that point.
2008 */
2009 g.zPath = &zPath[1];
2010 for(i=1; zPath[i] && zPath[i]!='/'; i++){}
2011 if( zPath[i]=='/' ){
2012 zPath[i] = 0;
2013 g.zExtra = &zPath[i+1];
2014 }else{
2015 g.zExtra = 0;
 
 
 
2016 }
2017 if( g.zExtra ){
2018 /* CGI parameters get this treatment elsewhere, but places like getfile
2019 ** will use g.zExtra directly.
2020 ** Reminder: the login mechanism uses 'name' differently, and may
2021

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button