misc dbl: coverity fixes
This commit is contained in:
parent
e6badc8b9e
commit
7808495eb9
1 changed files with 6 additions and 1 deletions
|
@ -183,7 +183,9 @@ my_double2str(char *buf, size_t bufsize, double realvalue)
|
|||
if( xtype==xGENERIC && precision>0 ) precision--;
|
||||
for(idx=precision, rounder=0.5; idx>0; idx--, rounder*=0.1){}
|
||||
|
||||
#if 0 /* coverity - dead code 'xtype == xGENERIC' here */
|
||||
if( xtype==xFLOAT ) realvalue += rounder;
|
||||
#endif
|
||||
/* Normalize realvalue to within 10.0 > realvalue >= 1.0 */
|
||||
exp = 0;
|
||||
|
||||
|
@ -268,9 +270,12 @@ my_double2str(char *buf, size_t bufsize, double realvalue)
|
|||
while( bufpt[-1]=='0' ) *(--bufpt) = 0;
|
||||
assert( bufpt>buf );
|
||||
if( bufpt[-1]=='.' ){
|
||||
#if 0 /* coverity - dead code - flag_altform2 == 0 here */
|
||||
if( flag_altform2 ){
|
||||
*(bufpt++) = '0';
|
||||
}else{
|
||||
}else
|
||||
#endif
|
||||
{
|
||||
*(--bufpt) = 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue