fix printf length arguments on lp64
found by coverity.
This commit is contained in:
parent
04fc586e75
commit
aff0c88a38
|
@ -259,7 +259,7 @@ write_imap_server( FILE *fp, config_t *cfg )
|
||||||
if (!p)
|
if (!p)
|
||||||
hl = nfsnprintf( buf, sizeof(buf), "%s", cfg->host );
|
hl = nfsnprintf( buf, sizeof(buf), "%s", cfg->host );
|
||||||
else {
|
else {
|
||||||
hl = nfsnprintf( buf, sizeof(buf), "%.*s", p - cfg->host, cfg->host );
|
hl = nfsnprintf( buf, sizeof(buf), "%.*s", (int)(p - cfg->host), cfg->host );
|
||||||
p2 = strrchr( buf, '.' );
|
p2 = strrchr( buf, '.' );
|
||||||
if (p2)
|
if (p2)
|
||||||
hl = sprintf( buf, "%s", p2 + 1 );
|
hl = sprintf( buf, "%s", p2 + 1 );
|
||||||
|
|
|
@ -376,7 +376,7 @@ main( int argc, char **argv )
|
||||||
if (!p)
|
if (!p)
|
||||||
nfsnprintf( path2, sizeof(path2), "%s.mbsync", config );
|
nfsnprintf( path2, sizeof(path2), "%s.mbsync", config );
|
||||||
else
|
else
|
||||||
nfsnprintf( path2, sizeof(path2), "%.*smb%s", p - config, config, p + 1 );
|
nfsnprintf( path2, sizeof(path2), "%.*smb%s", (int)(p - config), config, p + 1 );
|
||||||
outconfig = path2;
|
outconfig = path2;
|
||||||
}
|
}
|
||||||
if ((fd = creat( outconfig, 0666 )) < 0) {
|
if ((fd = creat( outconfig, 0666 )) < 0) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user