Module Name:    src
Committed By:   christos
Date:           Fri Apr 21 11:28:35 UTC 2017

Modified Files:
        src/bin/ln: ln.c

Log Message:
mark usage dead, simplify strings in it.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/bin/ln/ln.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/ln/ln.c
diff -u src/bin/ln/ln.c:1.36 src/bin/ln/ln.c:1.37
--- src/bin/ln/ln.c:1.36	Thu Apr 20 17:50:50 2017
+++ src/bin/ln/ln.c	Fri Apr 21 07:28:35 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ln.c,v 1.36 2017/04/20 21:50:50 christos Exp $	*/
+/*	$NetBSD: ln.c,v 1.37 2017/04/21 11:28:35 christos Exp $	*/
 
 /*-
  * Copyright (c) 1987, 1993, 1994
@@ -44,7 +44,7 @@ static char sccsid[] = "@(#)ln.c	8.2 (Be
 #ifdef __FBSDID
 __FBSDID("$FreeBSD: head/bin/ln/ln.c 251261 2013-06-02 17:55:00Z eadler $");
 #endif
-__RCSID("$NetBSD: ln.c,v 1.36 2017/04/20 21:50:50 christos Exp $");
+__RCSID("$NetBSD: ln.c,v 1.37 2017/04/21 11:28:35 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/stat.h>
@@ -71,7 +71,7 @@ static int	wflag;			/* Warn if symlink t
 static char	linkch;
 
 static int	linkit(const char *, const char *, int);
-static void	usage(void);
+static __dead void	usage(void);
 
 int
 main(int argc, char *argv[])
@@ -352,12 +352,12 @@ linkit(const char *source, const char *t
 	return (0);
 }
 
-static void
+static __dead void
 usage(void)
 {
-	(void)fprintf(stderr, "%s\n%s\n%s\n",
-	    "usage: ln [-s [-F] | -L | -P] [-f | -i] [-hnv] source_file [target_file]",
-	    "       ln [-s [-F] | -L | -P] [-f | -i] [-hnv] source_file ... target_dir",
-	    "       link source_file target_file");
+	(void)fprintf(stderr, 
+	    "usage: %s [-s [-F] | -L | -P] [-f | -i] [-hnv] source_file [target_file]\n"
+	    "       %s [-s [-F] | -L | -P] [-f | -i] [-hnv] source_file ... target_dir\n"
+	    "       link source_file target_file\n", getprogname(), getprogname());
 	exit(1);
 }

Reply via email to