Fossil SCM
Prefer use of fossil_strcmp that handles NULL better.
Commit
e97665e0566ef29247756ae3306bc0fe3147a860
Parent
912ca195104e7da…
1 file changed
+1
-1
+1
-1
| --- src/user.c | ||
| +++ src/user.c | ||
| @@ -136,11 +136,11 @@ | ||
| 136 | 136 | */ |
| 137 | 137 | int save_password_prompt(){ |
| 138 | 138 | Blob x; |
| 139 | 139 | char c; |
| 140 | 140 | const char *old = db_get("last-sync-pw", 0); |
| 141 | - if( (old!=0) && !strcmp(unobscure(old), g.urlPasswd) ){ | |
| 141 | + if( (old!=0) && fossil_strcmp(unobscure(old), g.urlPasswd)==0 ){ | |
| 142 | 142 | return 0; |
| 143 | 143 | } |
| 144 | 144 | prompt_user("remember password (Y/n)? ", &x); |
| 145 | 145 | c = blob_str(&x)[0]; |
| 146 | 146 | blob_reset(&x); |
| 147 | 147 |
| --- src/user.c | |
| +++ src/user.c | |
| @@ -136,11 +136,11 @@ | |
| 136 | */ |
| 137 | int save_password_prompt(){ |
| 138 | Blob x; |
| 139 | char c; |
| 140 | const char *old = db_get("last-sync-pw", 0); |
| 141 | if( (old!=0) && !strcmp(unobscure(old), g.urlPasswd) ){ |
| 142 | return 0; |
| 143 | } |
| 144 | prompt_user("remember password (Y/n)? ", &x); |
| 145 | c = blob_str(&x)[0]; |
| 146 | blob_reset(&x); |
| 147 |
| --- src/user.c | |
| +++ src/user.c | |
| @@ -136,11 +136,11 @@ | |
| 136 | */ |
| 137 | int save_password_prompt(){ |
| 138 | Blob x; |
| 139 | char c; |
| 140 | const char *old = db_get("last-sync-pw", 0); |
| 141 | if( (old!=0) && fossil_strcmp(unobscure(old), g.urlPasswd)==0 ){ |
| 142 | return 0; |
| 143 | } |
| 144 | prompt_user("remember password (Y/n)? ", &x); |
| 145 | c = blob_str(&x)[0]; |
| 146 | blob_reset(&x); |
| 147 |