Fossil SCM
removed a duplicated if() block, moved a free()-after-return, both reported by Edward Berner.
Commit
3fc62dde2cc56831a6766f4310532ab5fb020f80
Parent
ae00c6310943d14…
2 files changed
+1
-3
+2
-1
+1
-3
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -83,13 +83,11 @@ | ||
| 83 | 83 | if( zDisplayName[0]=='.' && zDisplayName[1]=='/' ){ |
| 84 | 84 | zDisplayName += 2; /* no unnecessary ./ prefix */ |
| 85 | 85 | } |
| 86 | 86 | } |
| 87 | 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) ){ | |
| 88 | + if( !file_wd_isfile_or_link(zFullName) ){ | |
| 91 | 89 | if( file_access(zFullName, F_OK)==0 ){ |
| 92 | 90 | blob_appendf(report, "NOT_A_FILE %s\n", zDisplayName); |
| 93 | 91 | if( missingIsFatal ){ |
| 94 | 92 | fossil_warning("not a file: %s", zDisplayName); |
| 95 | 93 | nErr++; |
| 96 | 94 |
| --- 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 @@ | ||
| 239 | 239 | /* |
| 240 | 240 | ** Get the HTTP Authorization preference from db. |
| 241 | 241 | */ |
| 242 | 242 | char *get_httpauth(void){ |
| 243 | 243 | char *zKey = mprintf("http-auth:%s", g.url.canonical); |
| 244 | - return unobscure(db_get(zKey, 0)); | |
| 244 | + char * rc = unobscure(db_get(zKey, 0)); | |
| 245 | 245 | free(zKey); |
| 246 | + return rc; | |
| 246 | 247 | } |
| 247 | 248 | |
| 248 | 249 | /* |
| 249 | 250 | ** Set the HTTP Authorization preference in db. |
| 250 | 251 | */ |
| 251 | 252 |
| --- 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 |