Fossil SCM

removed a duplicated if() block, moved a free()-after-return, both reported by Edward Berner.

stephan 2014-09-07 09:49 trunk
Commit 3fc62dde2cc56831a6766f4310532ab5fb020f80
2 files changed +1 -3 +2 -1
+1 -3
--- src/checkin.c
+++ src/checkin.c
@@ -83,13 +83,11 @@
8383
if( zDisplayName[0]=='.' && zDisplayName[1]=='/' ){
8484
zDisplayName += 2; /* no unnecessary ./ prefix */
8585
}
8686
}
8787
blob_append(report, zPrefix, nPrefix);
88
- if( isDeleted ){
89
- blob_appendf(report, "DELETED %s\n", zDisplayName);
90
- }else if( !file_wd_isfile_or_link(zFullName) ){
88
+ if( !file_wd_isfile_or_link(zFullName) ){
9189
if( file_access(zFullName, F_OK)==0 ){
9290
blob_appendf(report, "NOT_A_FILE %s\n", zDisplayName);
9391
if( missingIsFatal ){
9492
fossil_warning("not a file: %s", zDisplayName);
9593
nErr++;
9694
--- src/checkin.c
+++ src/checkin.c
@@ -83,13 +83,11 @@
83 if( zDisplayName[0]=='.' && zDisplayName[1]=='/' ){
84 zDisplayName += 2; /* no unnecessary ./ prefix */
85 }
86 }
87 blob_append(report, zPrefix, nPrefix);
88 if( isDeleted ){
89 blob_appendf(report, "DELETED %s\n", zDisplayName);
90 }else if( !file_wd_isfile_or_link(zFullName) ){
91 if( file_access(zFullName, F_OK)==0 ){
92 blob_appendf(report, "NOT_A_FILE %s\n", zDisplayName);
93 if( missingIsFatal ){
94 fossil_warning("not a file: %s", zDisplayName);
95 nErr++;
96
--- src/checkin.c
+++ src/checkin.c
@@ -83,13 +83,11 @@
83 if( zDisplayName[0]=='.' && zDisplayName[1]=='/' ){
84 zDisplayName += 2; /* no unnecessary ./ prefix */
85 }
86 }
87 blob_append(report, zPrefix, nPrefix);
88 if( !file_wd_isfile_or_link(zFullName) ){
 
 
89 if( file_access(zFullName, F_OK)==0 ){
90 blob_appendf(report, "NOT_A_FILE %s\n", zDisplayName);
91 if( missingIsFatal ){
92 fossil_warning("not a file: %s", zDisplayName);
93 nErr++;
94
+2 -1
--- src/clone.c
+++ src/clone.c
@@ -239,12 +239,13 @@
239239
/*
240240
** Get the HTTP Authorization preference from db.
241241
*/
242242
char *get_httpauth(void){
243243
char *zKey = mprintf("http-auth:%s", g.url.canonical);
244
- return unobscure(db_get(zKey, 0));
244
+ char * rc = unobscure(db_get(zKey, 0));
245245
free(zKey);
246
+ return rc;
246247
}
247248
248249
/*
249250
** Set the HTTP Authorization preference in db.
250251
*/
251252
--- src/clone.c
+++ src/clone.c
@@ -239,12 +239,13 @@
239 /*
240 ** Get the HTTP Authorization preference from db.
241 */
242 char *get_httpauth(void){
243 char *zKey = mprintf("http-auth:%s", g.url.canonical);
244 return unobscure(db_get(zKey, 0));
245 free(zKey);
 
246 }
247
248 /*
249 ** Set the HTTP Authorization preference in db.
250 */
251
--- src/clone.c
+++ src/clone.c
@@ -239,12 +239,13 @@
239 /*
240 ** Get the HTTP Authorization preference from db.
241 */
242 char *get_httpauth(void){
243 char *zKey = mprintf("http-auth:%s", g.url.canonical);
244 char * rc = unobscure(db_get(zKey, 0));
245 free(zKey);
246 return rc;
247 }
248
249 /*
250 ** Set the HTTP Authorization preference in db.
251 */
252

Keyboard Shortcuts

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