don't bother checking impossible condition

the config readear already verified that at least host or tunnel are
set.
This commit is contained in:
Oswald Buddenhagen 2014-03-09 15:56:52 +01:00
parent 3161540ab9
commit f55f42bdfc

View File

@ -245,7 +245,7 @@ write_imap_server( FILE *fp, config_t *cfg )
if (cfg->tunnel)
nfasprintf( (char **)&cfg->old_server_name, "tunnel%d", ++tunnels );
else if (cfg->host) {
else {
if (sscanf( cfg->host, "%d.%d.%d.%d", &a1, &a2, &a3, &a4 ) == 4)
hl = nfsnprintf( buf, sizeof(buf), "%s", cfg->host );
else {
@ -269,9 +269,6 @@ write_imap_server( FILE *fp, config_t *cfg )
cfg->old_server_name = nfstrdup( buf );
cfg->old_servers = 1;
gotsrv: ;
} else {
fprintf( stderr, "ERROR: Neither host nor tunnel specified for mailbox %s.\n", cfg->path );
exit( 1 );
}
if (cfg->user)