error-check renaming of uid mapping database

for pedantry.

found by coverity.
This commit is contained in:
Oswald Buddenhagen 2014-04-12 18:59:45 +02:00
parent 09db83809a
commit 532d964aea

View File

@ -240,7 +240,10 @@ convert( config_t *box )
goto err4;
}
db->close( db, 0 );
rename( iumname, diumname );
if (rename( iumname, diumname )) {
sys_error( "Cannot rename %s to %s", iumname, diumname );
goto err4;
}
} else {
if (!(fp = fopen( uvname, "w" ))) {
sys_error( "Cannot create %s", uvname );