From e8b419a01421de7b88997d9a0220522dd38cbe8b Mon Sep 17 00:00:00 2001 From: markus schnalke Date: Thu, 20 Nov 2014 07:06:31 +0100 Subject: [PATCH] coding style: Added braces even for one-line blocks This commit changes only uip/rmm.c. It would be tedious to change it everywhere. We can do this bit by bit as we go ... --- uip/rmm.c | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/uip/rmm.c b/uip/rmm.c index 51be03a..4b1d7d3 100644 --- a/uip/rmm.c +++ b/uip/rmm.c @@ -68,35 +68,44 @@ main(int argc, char **argv) } } if (*cp == '+' || *cp == '@') { - if (folder) + if (folder) { adios(NULL, "only one folder at a time!"); - else + } else { folder = getcpy(expandfol(cp)); - } else + } + } else { app_msgarg(&msgs, cp); + } } - if (!msgs.size) + if (!msgs.size) { app_msgarg(&msgs, seq_cur); - if (!folder) + } + if (!folder) { folder = getcurfol(); + } maildir = toabsdir(folder); - if (chdir(maildir) == NOTOK) + if (chdir(maildir) == NOTOK) { adios(maildir, "unable to change directory to"); + } /* read folder and create message structure */ - if (!(mp = folder_read(folder))) + if (!(mp = folder_read(folder))) { adios(NULL, "unable to read folder %s", folder); + } /* check for empty folder */ - if (mp->nummsg == 0) + if (mp->nummsg == 0) { adios(NULL, "no messages in %s", folder); + } /* parse all the message ranges/sequences and set SELECTED */ - for (msgnum = 0; msgnum < msgs.size; msgnum++) - if (!m_convert(mp, msgs.msgs[msgnum])) + for (msgnum = 0; msgnum < msgs.size; msgnum++) { + if (!m_convert(mp, msgs.msgs[msgnum])) { done(1); + } + } seq_setprev(mp); /* set the previous-sequence */ @@ -125,16 +134,18 @@ main(int argc, char **argv) /* remove by refiling. */ /* Unset the EXISTS flag for each message to be removed */ for (msgnum = mp->lowsel; msgnum <= mp->hghsel; msgnum++) { - if (is_selected(mp, msgnum)) + if (is_selected(mp, msgnum)) { unset_exists(mp, msgnum); + } } /* Mark that the sequence information has changed */ mp->msgflags |= SEQMOD; - if (mp->numsel+4 > MAXARGS) + if (mp->numsel+4 > MAXARGS) { adios(NULL, "more than %d messages for refile exec", MAXARGS - 4); + } vec = (char **)mh_xmalloc((size_t)(mp->numsel + 4) * sizeof(*vec)); vec[vecp++] = "refile"; vec[vecp++] = "-nolink"; -- 1.7.10.4