Module Name:    src
Committed By:   christos
Date:           Wed May  3 01:37:16 UTC 2017

Modified Files:
        src/sbin/nvmectl: nvmectl.c nvmectl.h

Log Message:
sprinkle static and death


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sbin/nvmectl/nvmectl.c \
    src/sbin/nvmectl/nvmectl.h

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

Modified files:

Index: src/sbin/nvmectl/nvmectl.c
diff -u src/sbin/nvmectl/nvmectl.c:1.3 src/sbin/nvmectl/nvmectl.c:1.4
--- src/sbin/nvmectl/nvmectl.c:1.3	Fri Apr 28 20:06:40 2017
+++ src/sbin/nvmectl/nvmectl.c	Tue May  2 21:37:16 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvmectl.c,v 1.3 2017/04/29 00:06:40 nonaka Exp $	*/
+/*	$NetBSD: nvmectl.c,v 1.4 2017/05/03 01:37:16 christos Exp $	*/
 
 /*-
  * Copyright (C) 2012-2013 Intel Corporation
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: nvmectl.c,v 1.3 2017/04/29 00:06:40 nonaka Exp $");
+__RCSID("$NetBSD: nvmectl.c,v 1.4 2017/05/03 01:37:16 christos Exp $");
 #if 0
 __FBSDID("$FreeBSD: head/sbin/nvmecontrol/nvmecontrol.c 314229 2017-02-25 00:09:12Z imp $");
 #endif
@@ -70,7 +70,7 @@ static struct nvme_function funcs[] = {
 	{NULL,		NULL,		NULL},
 };
 
-void
+static __dead void
 gen_usage(struct nvme_function *f)
 {
 
@@ -82,15 +82,13 @@ gen_usage(struct nvme_function *f)
 	exit(1);
 }
 
-void
+__dead void
 dispatch(int argc, char *argv[], struct nvme_function *tbl)
 {
 	struct nvme_function *f = tbl;
 
-	if (argv[1] == NULL) {
+	if (argv[1] == NULL)
 		gen_usage(tbl);
-		return;
-	}
 
 	while (f->name != NULL) {
 		if (strcmp(argv[1], f->name) == 0)
Index: src/sbin/nvmectl/nvmectl.h
diff -u src/sbin/nvmectl/nvmectl.h:1.3 src/sbin/nvmectl/nvmectl.h:1.4
--- src/sbin/nvmectl/nvmectl.h:1.3	Fri Apr 28 20:06:40 2017
+++ src/sbin/nvmectl/nvmectl.h	Tue May  2 21:37:16 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvmectl.h,v 1.3 2017/04/29 00:06:40 nonaka Exp $	*/
+/*	$NetBSD: nvmectl.h,v 1.4 2017/05/03 01:37:16 christos Exp $	*/
 
 /*-
  * Copyright (C) 2012-2013 Intel Corporation
@@ -102,8 +102,7 @@ void read_controller_data(int, struct nv
 void read_namespace_data(int, int, struct nvm_identify_namespace *);
 void print_hex(void *, uint32_t);
 void read_logpage(int, uint8_t, int, void *, uint32_t);
-void gen_usage(struct nvme_function *) __dead;
-void dispatch(int argc, char *argv[], struct nvme_function *f);
+__dead void dispatch(int argc, char *argv[], struct nvme_function *f);
 void nvme_strvis(uint8_t *, int, const uint8_t *, int);
 
 #endif	/* __NVMECTL_H__ */

Reply via email to