* mu-cmd-extract,test-mu-util: cleanups to pass line33/cc10
This commit is contained in:
@ -191,14 +191,9 @@ show_parts (const char* path, MuConfigOptions *opts)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
static gboolean
|
||||||
mu_cmd_extract (MuConfigOptions *opts)
|
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]) {
|
if (!opts->params[1]) {
|
||||||
g_warning ("missing mail file to extract something from");
|
g_warning ("missing mail file to extract something from");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -220,6 +215,20 @@ mu_cmd_extract (MuConfigOptions *opts)
|
|||||||
return FALSE;
|
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 &&
|
if (!opts->parts &&
|
||||||
!opts->save_attachments &&
|
!opts->save_attachments &&
|
||||||
!opts->save_all) /* show, don't save */
|
!opts->save_all) /* show, don't save */
|
||||||
|
|||||||
@ -203,12 +203,9 @@ main (int argc, char *argv[])
|
|||||||
g_test_init (&argc, &argv, NULL);
|
g_test_init (&argc, &argv, NULL);
|
||||||
|
|
||||||
/* mu_util_dir_expand */
|
/* mu_util_dir_expand */
|
||||||
g_test_add_func ("/mu-util/mu-util-dir-expand-01",
|
g_test_add_func ("/mu-util/mu-util-dir-expand-01", test_mu_util_dir_expand_01);
|
||||||
test_mu_util_dir_expand_01);
|
g_test_add_func ("/mu-util/mu-util-dir-expand-02", test_mu_util_dir_expand_02);
|
||||||
g_test_add_func ("/mu-util/mu-util-dir-expand-02",
|
g_test_add_func ("/mu-util/mu-util-dir-expand-03", test_mu_util_dir_expand_03);
|
||||||
test_mu_util_dir_expand_02);
|
|
||||||
g_test_add_func ("/mu-util/mu-util-dir-expand-03",
|
|
||||||
test_mu_util_dir_expand_03);
|
|
||||||
|
|
||||||
/* mu_util_guess_maildir */
|
/* mu_util_guess_maildir */
|
||||||
g_test_add_func ("/mu-util/mu-util-guess-maildir-01",
|
g_test_add_func ("/mu-util/mu-util-guess-maildir-01",
|
||||||
@ -217,14 +214,10 @@ main (int argc, char *argv[])
|
|||||||
test_mu_util_guess_maildir_02);
|
test_mu_util_guess_maildir_02);
|
||||||
|
|
||||||
/* mu_util_check_dir */
|
/* mu_util_check_dir */
|
||||||
g_test_add_func ("/mu-util/mu-util-check-dir-01",
|
g_test_add_func ("/mu-util/mu-util-check-dir-01", test_mu_util_check_dir_01);
|
||||||
test_mu_util_check_dir_01);
|
g_test_add_func ("/mu-util/mu-util-check-dir-02", test_mu_util_check_dir_02);
|
||||||
g_test_add_func ("/mu-util/mu-util-check-dir-02",
|
g_test_add_func ("/mu-util/mu-util-check-dir-03", test_mu_util_check_dir_03);
|
||||||
test_mu_util_check_dir_02);
|
g_test_add_func ("/mu-util/mu-util-check-dir-04", test_mu_util_check_dir_04);
|
||||||
g_test_add_func ("/mu-util/mu-util-check-dir-03",
|
|
||||||
test_mu_util_check_dir_03);
|
|
||||||
g_test_add_func ("/mu-util/mu-util-check-dir-04",
|
|
||||||
test_mu_util_check_dir_04);
|
|
||||||
|
|
||||||
/* test_mu_util_str_from_strv */
|
/* test_mu_util_str_from_strv */
|
||||||
g_test_add_func ("/mu-util/mu-util-str-from-strv-01",
|
g_test_add_func ("/mu-util/mu-util-str-from-strv-01",
|
||||||
|
|||||||
Reference in New Issue
Block a user