Fossil SCM

Fix a harmless compiler warning.

drh 2015-08-12 04:51 trunk
Commit c64989d5a0b791261bd4c7ad4fc9040b04367707
1 file changed +1 -1
+1 -1
--- src/main.c
+++ src/main.c
@@ -897,11 +897,11 @@
897897
const char *zOption;
898898
const char **pzArgs = 0;
899899
int nAllocArgs = 0;
900900
int nUsedArgs = 0;
901901
902
- while( zOption = find_option(zLong, zShort, 1) ){
902
+ while( (zOption = find_option(zLong, zShort, 1))!=0 ){
903903
if( pzArgs==0 && nAllocArgs==0 ){
904904
nAllocArgs = 1;
905905
pzArgs = fossil_malloc( nAllocArgs*sizeof(pzArgs[0]) );
906906
}else if( nAllocArgs<=nUsedArgs ){
907907
nAllocArgs = nAllocArgs*2;
908908
--- src/main.c
+++ src/main.c
@@ -897,11 +897,11 @@
897 const char *zOption;
898 const char **pzArgs = 0;
899 int nAllocArgs = 0;
900 int nUsedArgs = 0;
901
902 while( zOption = find_option(zLong, zShort, 1) ){
903 if( pzArgs==0 && nAllocArgs==0 ){
904 nAllocArgs = 1;
905 pzArgs = fossil_malloc( nAllocArgs*sizeof(pzArgs[0]) );
906 }else if( nAllocArgs<=nUsedArgs ){
907 nAllocArgs = nAllocArgs*2;
908
--- src/main.c
+++ src/main.c
@@ -897,11 +897,11 @@
897 const char *zOption;
898 const char **pzArgs = 0;
899 int nAllocArgs = 0;
900 int nUsedArgs = 0;
901
902 while( (zOption = find_option(zLong, zShort, 1))!=0 ){
903 if( pzArgs==0 && nAllocArgs==0 ){
904 nAllocArgs = 1;
905 pzArgs = fossil_malloc( nAllocArgs*sizeof(pzArgs[0]) );
906 }else if( nAllocArgs<=nUsedArgs ){
907 nAllocArgs = nAllocArgs*2;
908

Keyboard Shortcuts

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