From: Ralph Corderoy Date: Wed, 23 Aug 2017 20:20:25 +0000 (+0100) Subject: mhlistsbr.c: Replace list_application() with body at call site. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/4ecdd9dda778478a2d3244cfc349df69a4224f96?ds=inline mhlistsbr.c: Replace list_application() with body at call site. list_application()'s comment said the function didn't need to exist. It's correct, so delete it. The sole caller now calls list_content(), as list_application() used to do. That's actually the same as other cases in the switch so merge them. There is a slight difference: list_application() used to call list_content() and then return OK regardless, now it returns list_content()'s value, but that's always OK too. --- diff --git a/uip/mhlistsbr.c b/uip/mhlistsbr.c index f7ecbc89..a96843d9 100644 --- a/uip/mhlistsbr.c +++ b/uip/mhlistsbr.c @@ -27,7 +27,6 @@ static int list_debug (CT); static int list_multi (CT, int, int, int, int, int); static int list_partial (CT, int, int, int, int, int); static int list_external (CT, int, int, int, int, int); -static int list_application (CT, int, int, int, int, int); static int list_encoding (CT); @@ -121,12 +120,9 @@ list_switch (CT ct, int toplevel, int realsize, int verbose, int debug, case CT_AUDIO: case CT_IMAGE: case CT_VIDEO: - return list_content (ct, toplevel, realsize, verbose, debug, dispo); - case CT_APPLICATION: default: - return list_application (ct, toplevel, realsize, verbose, debug, - dispo); + return list_content (ct, toplevel, realsize, verbose, debug, dispo); } return 0; /* NOT REACHED */ @@ -419,23 +415,6 @@ list_external (CT ct, int toplevel, int realsize, int verbose, int debug, } -/* - * list content information for type "application" - * This no longer needs to be a separate function. It used to - * produce some output with verbose enabled, but that has been - * moved to list_content (). - */ - -static int -list_application (CT ct, int toplevel, int realsize, int verbose, int debug, - int dispo) -{ - list_content (ct, toplevel, realsize, verbose, debug, dispo); - - return OK; -} - - /* * list information about the Content-Transfer-Encoding * used by a content.