From: markus schnalke Date: Sun, 20 Nov 2011 11:38:17 +0000 (+0100) Subject: The existence of the profile entry Path is already enforced by context_read(). X-Git-Tag: mmh-thesis-end~472 X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=3d78b9c80a95f4e7885ed607018f9b1b9be559b4;p=mmh The existence of the profile entry Path is already enforced by context_read(). Hence, removed the obscure ``free(path("./", TFOLDER));'' calls. Still I don't see the sense in these lines, but they won't get executed, as the condition is checked before (and the program aborts then). Probably that's obsolete stuff that remained through several reworks. --- diff --git a/uip/anno.c b/uip/anno.c index 3a0fa8cb..66d8a0d4 100644 --- a/uip/anno.c +++ b/uip/anno.c @@ -208,8 +208,6 @@ main(int argc, char **argv) datesw = 0; #endif /* UCI */ - if (!context_find("path")) - free(path("./", TFOLDER)); if (!msgs.size) app_msgarg(&msgs, "cur"); if (!folder) diff --git a/uip/burst.c b/uip/burst.c index 032c5b5c..44f6bfe9 100644 --- a/uip/burst.c +++ b/uip/burst.c @@ -113,8 +113,6 @@ main(int argc, char **argv) } } - if (!context_find("path")) - free(path("./", TFOLDER)); if (!msgp) msgs[msgp++] = "cur"; if (!folder) diff --git a/uip/comp.c b/uip/comp.c index 9f0929d7..95b5c94e 100644 --- a/uip/comp.c +++ b/uip/comp.c @@ -135,9 +135,6 @@ main(int argc, char **argv) cwd = getcpy(pwd()); - if (!context_find("path")) - free(path("./", TFOLDER)); - if (form && (folder || msg)) adios(NULL, "can't mix forms and folders/msgs"); diff --git a/uip/dist.c b/uip/dist.c index 131cda94..d31c5c95 100644 --- a/uip/dist.c +++ b/uip/dist.c @@ -138,8 +138,6 @@ main(int argc, char **argv) cwd = getcpy(pwd()); - if (!context_find("path")) - free(path("./", TFOLDER)); if (file && (msg || folder)) adios(NULL, "can't mix files and folders/msgs"); diff --git a/uip/flist.c b/uip/flist.c index 5d9dfcc3..88cac063 100644 --- a/uip/flist.c +++ b/uip/flist.c @@ -236,9 +236,6 @@ main(int argc, char **argv) } } - if (!context_find("path")) - free(path("./", TFOLDER)); - /* get current folder */ strncpy(curfolder, getfolder(FCUR), sizeof(curfolder)); diff --git a/uip/folder.c b/uip/folder.c index 4fa9424b..735b5e79 100644 --- a/uip/folder.c +++ b/uip/folder.c @@ -250,8 +250,6 @@ main(int argc, char **argv) } } - if (!context_find("path")) - free(path("./", TFOLDER)); nmhdir = concat(m_maildir(""), "/", NULL); /* diff --git a/uip/forw.c b/uip/forw.c index 002bb675..666228b7 100644 --- a/uip/forw.c +++ b/uip/forw.c @@ -241,8 +241,6 @@ main(int argc, char **argv) cwd = getcpy(pwd()); - if (!context_find("path")) - free(path("./", TFOLDER)); if (file && (msgp || folder)) adios(NULL, "can't mix files and folders/msgs"); diff --git a/uip/inc.c b/uip/inc.c index d23bf32d..9e6fb6f0 100644 --- a/uip/inc.c +++ b/uip/inc.c @@ -300,8 +300,6 @@ main(int argc, char **argv) newmail = cp; - if (!context_find("path")) - free(path("./", TFOLDER)); if (!folder) folder = getfolder(FDEF); maildir = m_maildir(folder); diff --git a/uip/mark.c b/uip/mark.c index d56a1615..fd43a209 100644 --- a/uip/mark.c +++ b/uip/mark.c @@ -151,8 +151,6 @@ main(int argc, char **argv) listsw++; } - if (!context_find("path")) - free(path("./", TFOLDER)); if (!msgs.size) app_msgarg(&msgs, listsw ? "all" :"cur"); if (!folder) diff --git a/uip/mhbuild.c b/uip/mhbuild.c index 735a77e1..50552656 100644 --- a/uip/mhbuild.c +++ b/uip/mhbuild.c @@ -295,9 +295,6 @@ main(int argc, char **argv) else tmp = add(m_maildir(invo_name), NULL); - if (!context_find("path")) - free(path("./", TFOLDER)); - /* Check if we have a file to process */ if (!compfile) adios(NULL, "need to specify a %s composition file", diff --git a/uip/mhlist.c b/uip/mhlist.c index 5eb0937c..92169a0a 100644 --- a/uip/mhlist.c +++ b/uip/mhlist.c @@ -268,9 +268,6 @@ do_cache: else tmp = add(m_maildir(invo_name), NULL); - if (!context_find("path")) - free(path("./", TFOLDER)); - if (file && msgs.size) adios(NULL, "cannot specify msg and file at same time!"); diff --git a/uip/mhpath.c b/uip/mhpath.c index 2281ba0e..eb3b6182 100644 --- a/uip/mhpath.c +++ b/uip/mhpath.c @@ -68,9 +68,6 @@ main(int argc, char **argv) app_msgarg(&msgs, cp); } - if (!context_find("path")) - free(path("./", TFOLDER)); - if (!folder) folder = getfolder(FCUR); maildir = m_maildir(folder); diff --git a/uip/mhshow.c b/uip/mhshow.c index bb7a8e71..42e0ee06 100644 --- a/uip/mhshow.c +++ b/uip/mhshow.c @@ -340,9 +340,6 @@ do_cache: else tmp = add(m_maildir(invo_name), NULL); - if (!context_find("path")) - free(path("./", TFOLDER)); - if (file && msgs.size) adios(NULL, "cannot specify msg and file at same time!"); diff --git a/uip/mhstore.c b/uip/mhstore.c index f61a5c02..4a17547d 100644 --- a/uip/mhstore.c +++ b/uip/mhstore.c @@ -283,9 +283,6 @@ do_cache: else tmp = add(m_maildir(invo_name), NULL); - if (!context_find("path")) - free(path("./", TFOLDER)); - if (file && msgs.size) adios(NULL, "cannot specify msg and file at same time!"); diff --git a/uip/mhtest.c b/uip/mhtest.c index 581349f6..454fa1d4 100644 --- a/uip/mhtest.c +++ b/uip/mhtest.c @@ -261,9 +261,6 @@ do_cache: else tmp = add(m_maildir(invo_name), NULL); - if (!context_find("path")) - free(path("./", TFOLDER)); - if (file && msgs.size) adios(NULL, "cannot specify msg and file at same time!"); diff --git a/uip/packf.c b/uip/packf.c index 727298cd..5e171475 100644 --- a/uip/packf.c +++ b/uip/packf.c @@ -120,9 +120,6 @@ main(int argc, char **argv) free(cp); } - if (!context_find("path")) - free(path("./", TFOLDER)); - /* default is to pack whole folder */ if (!msgs.size) app_msgarg(&msgs, "all"); diff --git a/uip/pick.c b/uip/pick.c index 69b94150..f0dcec37 100644 --- a/uip/pick.c +++ b/uip/pick.c @@ -188,9 +188,6 @@ main(int argc, char **argv) } vec[vecp] = NULL; - if (!context_find("path")) - free(path("./", TFOLDER)); - /* ** If we didn't specify which messages to search, ** then search the whole folder. diff --git a/uip/rcvstore.c b/uip/rcvstore.c index a120c665..5ed378a9 100644 --- a/uip/rcvstore.c +++ b/uip/rcvstore.c @@ -144,9 +144,6 @@ main(int argc, char **argv) seqs[seqp] = NULL; /* NULL terminate list of sequences */ - if (!context_find("path")) - free(path("./", TFOLDER)); - /* if no folder is given, use default folder */ if (!folder) folder = getfolder(FDEF); diff --git a/uip/refile.c b/uip/refile.c index 34e55ce1..690b55b1 100644 --- a/uip/refile.c +++ b/uip/refile.c @@ -160,8 +160,6 @@ main(int argc, char **argv) app_msgarg(&msgs, cp); } - if (!context_find("path")) - free(path("./", TFOLDER)); if (foldp == 0) adios(NULL, "no folder specified"); diff --git a/uip/repl.c b/uip/repl.c index 8d10e5d7..fd92101f 100644 --- a/uip/repl.c +++ b/uip/repl.c @@ -285,8 +285,6 @@ main(int argc, char **argv) cwd = getcpy(pwd()); - if (!context_find("path")) - free(path("./", TFOLDER)); if (file && (msg || folder)) adios(NULL, "can't mix files and folders/msgs"); diff --git a/uip/rmf.c b/uip/rmf.c index 94198d00..3b532e0e 100644 --- a/uip/rmf.c +++ b/uip/rmf.c @@ -81,8 +81,6 @@ main(int argc, char **argv) } } - if (!context_find("path")) - free(path("./", TFOLDER)); if (!folder) { folder = getfolder(FCUR); defolder++; diff --git a/uip/rmm.c b/uip/rmm.c index aca436a1..b90b43e5 100644 --- a/uip/rmm.c +++ b/uip/rmm.c @@ -78,8 +78,6 @@ main(int argc, char **argv) app_msgarg(&msgs, cp); } - if (!context_find("path")) - free(path("./", TFOLDER)); if (!msgs.size) app_msgarg(&msgs, "cur"); if (!folder) diff --git a/uip/scan.c b/uip/scan.c index 4b0b3380..80addfcc 100644 --- a/uip/scan.c +++ b/uip/scan.c @@ -157,9 +157,6 @@ main(int argc, char **argv) app_msgarg(&msgs, cp); } - if (!context_find("path")) - free(path("./", TFOLDER)); - /* ** Get new format string. Must be before chdir(). */ diff --git a/uip/send.c b/uip/send.c index f7771558..81633850 100644 --- a/uip/send.c +++ b/uip/send.c @@ -257,9 +257,6 @@ main(int argc, char **argv) } } - if (!context_find("path")) - free(path("./", TFOLDER)); - if (!msgp) msgs[msgp++] = "cur"; maildir = m_maildir(draftfolder); diff --git a/uip/show.c b/uip/show.c index ceb90188..fb517d12 100644 --- a/uip/show.c +++ b/uip/show.c @@ -173,9 +173,6 @@ usage: } procp = vecp; - if (!context_find("path")) - free(path("./", TFOLDER)); - if (file) { if (msgp) adios(NULL, "only one file at a time!"); diff --git a/uip/sortm.c b/uip/sortm.c index 51518892..f9a4cff4 100644 --- a/uip/sortm.c +++ b/uip/sortm.c @@ -164,8 +164,6 @@ main(int argc, char **argv) app_msgarg(&msgs, cp); } - if (!context_find("path")) - free(path("./", TFOLDER)); if (!msgs.size) app_msgarg(&msgs, "all"); if (!datesw)