db-test: remove ugly function declaration inside main function ...