summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorнаб <[email protected]>2022-01-22 01:56:46 +0100
committerBrian Behlendorf <[email protected]>2022-03-15 15:13:48 -0700
commitd465fc584425c618f8baa13a31b70ffabe053484 (patch)
treed5c120208b294829231adc7d7efbb28fdee3adcd /cmd
parent861166b02701dfc8f63a105bd32758e806c84fd7 (diff)
Forbid b{copy,zero,cmp}(). Don't include <strings.h> for <string.h>
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12996
Diffstat (limited to 'cmd')
-rw-r--r--cmd/zed/agents/fmd_api.c2
-rw-r--r--cmd/zed/agents/fmd_serd.c2
-rw-r--r--cmd/zed/agents/zfs_diagnosis.c1
-rw-r--r--cmd/zfs/zfs_iter.c1
-rw-r--r--cmd/zfs/zfs_main.c2
-rw-r--r--cmd/zfs/zfs_project.c2
-rw-r--r--cmd/zinject/translate.c3
-rw-r--r--cmd/zinject/zinject.c3
-rw-r--r--cmd/zpool/zpool_iter.c2
-rw-r--r--cmd/zpool/zpool_util.c2
-rw-r--r--cmd/zstream/zstream.c2
-rw-r--r--cmd/zstream/zstream_dump.c2
-rw-r--r--cmd/zstream/zstream_redup.c2
-rw-r--r--cmd/zstream/zstream_token.c2
14 files changed, 14 insertions, 14 deletions
diff --git a/cmd/zed/agents/fmd_api.c b/cmd/zed/agents/fmd_api.c
index 24d6d357e..d97f67b4f 100644
--- a/cmd/zed/agents/fmd_api.c
+++ b/cmd/zed/agents/fmd_api.c
@@ -38,7 +38,7 @@
#include <sys/fm/protocol.h>
#include <uuid/uuid.h>
#include <signal.h>
-#include <strings.h>
+#include <string.h>
#include <time.h>
#include "fmd_api.h"
diff --git a/cmd/zed/agents/fmd_serd.c b/cmd/zed/agents/fmd_serd.c
index 497dffe7f..94736ce42 100644
--- a/cmd/zed/agents/fmd_serd.c
+++ b/cmd/zed/agents/fmd_serd.c
@@ -29,7 +29,7 @@
#include <assert.h>
#include <stddef.h>
#include <stdlib.h>
-#include <strings.h>
+#include <string.h>
#include <sys/list.h>
#include <sys/time.h>
diff --git a/cmd/zed/agents/zfs_diagnosis.c b/cmd/zed/agents/zfs_diagnosis.c
index 3e45a957f..4fe9ee2bc 100644
--- a/cmd/zed/agents/zfs_diagnosis.c
+++ b/cmd/zed/agents/zfs_diagnosis.c
@@ -27,7 +27,6 @@
#include <stddef.h>
#include <string.h>
-#include <strings.h>
#include <libuutil.h>
#include <libzfs.h>
#include <sys/types.h>
diff --git a/cmd/zfs/zfs_iter.c b/cmd/zfs/zfs_iter.c
index 8b6a49a79..d44bc2ad7 100644
--- a/cmd/zfs/zfs_iter.c
+++ b/cmd/zfs/zfs_iter.c
@@ -32,7 +32,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <strings.h>
#include <libzfs.h>
diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c
index 36df2e8f4..938fd2edd 100644
--- a/cmd/zfs/zfs_main.c
+++ b/cmd/zfs/zfs_main.c
@@ -46,7 +46,7 @@
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
-#include <strings.h>
+#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <zone.h>
diff --git a/cmd/zfs/zfs_project.c b/cmd/zfs/zfs_project.c
index 341cc005d..757d04358 100644
--- a/cmd/zfs/zfs_project.c
+++ b/cmd/zfs/zfs_project.c
@@ -27,7 +27,7 @@
#include <getopt.h>
#include <stdio.h>
#include <stdlib.h>
-#include <strings.h>
+#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <dirent.h>
diff --git a/cmd/zinject/translate.c b/cmd/zinject/translate.c
index 4939c0b85..2b5f1fcd9 100644
--- a/cmd/zinject/translate.c
+++ b/cmd/zinject/translate.c
@@ -31,7 +31,7 @@
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
-#include <strings.h>
+#include <string.h>
#include <sys/file.h>
#include <sys/mntent.h>
#include <sys/mnttab.h>
@@ -186,6 +186,7 @@ initialize_range(err_type_t type, int level, char *range,
switch (type) {
default:
break;
+
case TYPE_DATA:
break;
diff --git a/cmd/zinject/zinject.c b/cmd/zinject/zinject.c
index 10d5dbe90..74c54baeb 100644
--- a/cmd/zinject/zinject.c
+++ b/cmd/zinject/zinject.c
@@ -144,6 +144,7 @@
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <strings.h>
#include <unistd.h>
@@ -159,7 +160,7 @@
libzfs_handle_t *g_zfs;
int zfs_fd;
-static const char *errtable[TYPE_INVAL] = {
+static const char *const errtable[TYPE_INVAL] = {
"data",
"dnode",
"mos",
diff --git a/cmd/zpool/zpool_iter.c b/cmd/zpool/zpool_iter.c
index 65e53f8e0..ec3f768e3 100644
--- a/cmd/zpool/zpool_iter.c
+++ b/cmd/zpool/zpool_iter.c
@@ -32,7 +32,7 @@
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
-#include <strings.h>
+#include <string.h>
#include <thread_pool.h>
#include <libzfs.h>
diff --git a/cmd/zpool/zpool_util.c b/cmd/zpool/zpool_util.c
index 1c64c83d8..91dbb8ec4 100644
--- a/cmd/zpool/zpool_util.c
+++ b/cmd/zpool/zpool_util.c
@@ -28,7 +28,7 @@
#include <libintl.h>
#include <stdio.h>
#include <stdlib.h>
-#include <strings.h>
+#include <string.h>
#include <ctype.h>
#include "zpool_util.h"
diff --git a/cmd/zstream/zstream.c b/cmd/zstream/zstream.c
index 523ae0689..a228f45fa 100644
--- a/cmd/zstream/zstream.c
+++ b/cmd/zstream/zstream.c
@@ -23,7 +23,7 @@
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
-#include <strings.h>
+#include <string.h>
#include <unistd.h>
#include <libintl.h>
#include <stddef.h>
diff --git a/cmd/zstream/zstream_dump.c b/cmd/zstream/zstream_dump.c
index 04a4986b4..977256cae 100644
--- a/cmd/zstream/zstream_dump.c
+++ b/cmd/zstream/zstream_dump.c
@@ -34,7 +34,7 @@
#include <libnvpair.h>
#include <stdio.h>
#include <stdlib.h>
-#include <strings.h>
+#include <string.h>
#include <unistd.h>
#include <stddef.h>
diff --git a/cmd/zstream/zstream_redup.c b/cmd/zstream/zstream_redup.c
index 36431dc1e..20aff17ae 100644
--- a/cmd/zstream/zstream_redup.c
+++ b/cmd/zstream/zstream_redup.c
@@ -27,7 +27,7 @@
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
-#include <strings.h>
+#include <string.h>
#include <umem.h>
#include <unistd.h>
#include <sys/debug.h>
diff --git a/cmd/zstream/zstream_token.c b/cmd/zstream/zstream_token.c
index 36a76a4bb..bedb6893c 100644
--- a/cmd/zstream/zstream_token.c
+++ b/cmd/zstream/zstream_token.c
@@ -34,7 +34,7 @@
#include <libnvpair.h>
#include <stdio.h>
#include <stdlib.h>
-#include <strings.h>
+#include <string.h>
#include <unistd.h>
#include <stddef.h>