Fossil SCM

Remove an unused variable.

drh 2019-07-25 21:09 extension-cgi
Commit c2a98a5d621f29ab2e5967a968b9bba58703ddae79dad0428ef34804af19f676
1 file changed -2
--- src/extcgi.c
+++ src/extcgi.c
@@ -99,11 +99,10 @@
9999
*/
100100
void ext_page(void){
101101
const char *zName = P("name"); /* Path information after /ext */
102102
char *zPath = 0; /* Complete path from extroot */
103103
int nRoot; /* Number of bytes in the extroot name */
104
- int nName; /* Length of zName */
105104
char *zScript = 0; /* Name of the CGI script */
106105
int nScript = 0; /* Bytes in the CGI script name */
107106
const char *zFailReason = "???";/* Reason for failure */
108107
int i; /* Loop counter */
109108
const char *zMime = 0; /* MIME type of the reply */
@@ -134,11 +133,10 @@
134133
zFailReason = "extroot is not a directory";
135134
goto ext_not_found;
136135
}
137136
zPath = mprintf("%s/%s", g.zExtRoot, zName);
138137
nRoot = (int)strlen(g.zExtRoot);
139
- nName = (int)strlen(zName);
140138
if( file_isfile(zPath, ExtFILE) ){
141139
nScript = (int)strlen(zPath);
142140
zScript = zPath;
143141
}else{
144142
for(i=nRoot+1; zPath[i]; i++){
145143
--- src/extcgi.c
+++ src/extcgi.c
@@ -99,11 +99,10 @@
99 */
100 void ext_page(void){
101 const char *zName = P("name"); /* Path information after /ext */
102 char *zPath = 0; /* Complete path from extroot */
103 int nRoot; /* Number of bytes in the extroot name */
104 int nName; /* Length of zName */
105 char *zScript = 0; /* Name of the CGI script */
106 int nScript = 0; /* Bytes in the CGI script name */
107 const char *zFailReason = "???";/* Reason for failure */
108 int i; /* Loop counter */
109 const char *zMime = 0; /* MIME type of the reply */
@@ -134,11 +133,10 @@
134 zFailReason = "extroot is not a directory";
135 goto ext_not_found;
136 }
137 zPath = mprintf("%s/%s", g.zExtRoot, zName);
138 nRoot = (int)strlen(g.zExtRoot);
139 nName = (int)strlen(zName);
140 if( file_isfile(zPath, ExtFILE) ){
141 nScript = (int)strlen(zPath);
142 zScript = zPath;
143 }else{
144 for(i=nRoot+1; zPath[i]; i++){
145
--- src/extcgi.c
+++ src/extcgi.c
@@ -99,11 +99,10 @@
99 */
100 void ext_page(void){
101 const char *zName = P("name"); /* Path information after /ext */
102 char *zPath = 0; /* Complete path from extroot */
103 int nRoot; /* Number of bytes in the extroot name */
 
104 char *zScript = 0; /* Name of the CGI script */
105 int nScript = 0; /* Bytes in the CGI script name */
106 const char *zFailReason = "???";/* Reason for failure */
107 int i; /* Loop counter */
108 const char *zMime = 0; /* MIME type of the reply */
@@ -134,11 +133,10 @@
133 zFailReason = "extroot is not a directory";
134 goto ext_not_found;
135 }
136 zPath = mprintf("%s/%s", g.zExtRoot, zName);
137 nRoot = (int)strlen(g.zExtRoot);
 
138 if( file_isfile(zPath, ExtFILE) ){
139 nScript = (int)strlen(zPath);
140 zScript = zPath;
141 }else{
142 for(i=nRoot+1; zPath[i]; i++){
143

Keyboard Shortcuts

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