Date: Mon, 18 Mar 2013 17:37:08 GMT From: Fernando <fernando.apesteguia@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: bin/177076: [PATCH] Small correction in cat's usage() function Message-ID: <201303181737.r2IHb8vY015637@red.freebsd.org> Resent-Message-ID: <201303181740.r2IHe0MF077376@freefall.freebsd.org>
index | next in thread | raw e-mail
>Number: 177076
>Category: bin
>Synopsis: [PATCH] Small correction in cat's usage() function
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Mar 18 17:40:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Fernando
>Release: 9.0-RELEASE
>Organization:
OpenSistemas
>Environment:
FreeBSD beastie 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:46:30 UTC 2012 root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
Two small corrections for bin/cat.
* Add the __dead2 attribute since it is a function that never returns
* Add an empty line in usage() according to style(9)
>How-To-Repeat:
>Fix:
Apply the attached patch
Patch attached with submission follows:
--- /usr/src/bin/cat/cat.c 2012-01-03 04:26:15.000000000 +0100
+++ cat.c 2013-03-18 18:31:38.000000000 +0100
@@ -68,7 +68,7 @@
int rval;
const char *filename;
-static void usage(void);
+static void usage(void) __dead2;
static void scanfiles(char *argv[], int cooked);
static void cook_cat(FILE *);
static void raw_cat(int);
@@ -136,6 +136,7 @@
static void
usage(void)
{
+
fprintf(stderr, "usage: cat [-benstuv] [file ...]\n");
exit(1);
/* NOTREACHED */
>Release-Note:
>Audit-Trail:
>Unformatted:
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303181737.r2IHb8vY015637>
