* mu-cmd-extract,test-mu-util: cleanups to pass line33/cc10

This commit is contained in:
Dirk-Jan C. Binnema
2010-10-30 15:14:14 +03:00
parent 0293eb19b3
commit 12f02ea08f
2 changed files with 23 additions and 21 deletions

View File

@ -191,14 +191,9 @@ show_parts (const char* path, MuConfigOptions *opts)
}
gboolean
mu_cmd_extract (MuConfigOptions *opts)
static gboolean
check_params (MuConfigOptions *opts)
{
gboolean rv;
g_return_val_if_fail (opts, FALSE);
g_return_val_if_fail (mu_cmd_equals (opts, "extract"), FALSE);
if (!opts->params[1]) {
g_warning ("missing mail file to extract something from");
return FALSE;
@ -220,6 +215,20 @@ mu_cmd_extract (MuConfigOptions *opts)
return FALSE;
}
return TRUE;
}
gboolean
mu_cmd_extract (MuConfigOptions *opts)
{
gboolean rv;
g_return_val_if_fail (opts, FALSE);
g_return_val_if_fail (mu_cmd_equals (opts, "extract"), FALSE);
if (!check_params (opts))
return FALSE;
if (!opts->parts &&
!opts->save_attachments &&
!opts->save_all) /* show, don't save */