Fossil SCM
Fix a memcmp() that really should be fossil_strcmp().
Commit
5853fcf132800f902f4586c7f24b286e88a6ac7c
Parent
28a1da05b1fa3f3…
1 file changed
+1
-1
+1
-1
| --- src/sync.c | ||
| +++ src/sync.c | ||
| @@ -38,11 +38,11 @@ | ||
| 38 | 38 | if( flags==SYNC_PUSH && db_get_boolean("dont-push",0) ){ |
| 39 | 39 | return 0; |
| 40 | 40 | } |
| 41 | 41 | zAutosync = db_get("autosync", 0); |
| 42 | 42 | if( zAutosync ){ |
| 43 | - if( (flags & SYNC_PUSH)!=0 && memcmp(zAutosync,"pull",4)==0 ){ | |
| 43 | + if( (flags & SYNC_PUSH)!=0 && fossil_strcmp(zAutosync,"pull")==0 ){ | |
| 44 | 44 | return 0; /* Do not auto-push when autosync=pullonly */ |
| 45 | 45 | } |
| 46 | 46 | if( is_false(zAutosync) ){ |
| 47 | 47 | return 0; /* Autosync is completely off */ |
| 48 | 48 | } |
| 49 | 49 |
| --- src/sync.c | |
| +++ src/sync.c | |
| @@ -38,11 +38,11 @@ | |
| 38 | if( flags==SYNC_PUSH && db_get_boolean("dont-push",0) ){ |
| 39 | return 0; |
| 40 | } |
| 41 | zAutosync = db_get("autosync", 0); |
| 42 | if( zAutosync ){ |
| 43 | if( (flags & SYNC_PUSH)!=0 && memcmp(zAutosync,"pull",4)==0 ){ |
| 44 | return 0; /* Do not auto-push when autosync=pullonly */ |
| 45 | } |
| 46 | if( is_false(zAutosync) ){ |
| 47 | return 0; /* Autosync is completely off */ |
| 48 | } |
| 49 |
| --- src/sync.c | |
| +++ src/sync.c | |
| @@ -38,11 +38,11 @@ | |
| 38 | if( flags==SYNC_PUSH && db_get_boolean("dont-push",0) ){ |
| 39 | return 0; |
| 40 | } |
| 41 | zAutosync = db_get("autosync", 0); |
| 42 | if( zAutosync ){ |
| 43 | if( (flags & SYNC_PUSH)!=0 && fossil_strcmp(zAutosync,"pull")==0 ){ |
| 44 | return 0; /* Do not auto-push when autosync=pullonly */ |
| 45 | } |
| 46 | if( is_false(zAutosync) ){ |
| 47 | return 0; /* Autosync is completely off */ |
| 48 | } |
| 49 |