summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2017-08-27 08:15:49 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2017-08-27 08:15:49 +0000
commitb6471a2a745d1b17a6f9bf85db827a059aec12f3 (patch)
tree5f3d905777f52badb87dfd8a5ee13b42e6901cb5 /sys
parentbd81767e41dd88c7430a7fb765c8a62cecc2ae66 (diff)
always use %s to print a non-constant string; ok deraadt@ guenther@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/microcode/bnx/build.c4
-rw-r--r--sys/dev/microcode/myx/build.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/microcode/bnx/build.c b/sys/dev/microcode/bnx/build.c
index 665b243b719..1e152f1c91c 100644
--- a/sys/dev/microcode/bnx/build.c
+++ b/sys/dev/microcode/bnx/build.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: build.c,v 1.8 2016/12/18 18:28:38 krw Exp $ */
+/* $OpenBSD: build.c,v 1.9 2017/08/27 08:15:48 otto Exp $ */
/*
* Copyright (c) 2004 Theo de Raadt <deraadt@openbsd.org>
@@ -127,7 +127,7 @@ write_firmware(char *filename, void *header, size_t hlen,
printf("creating %s", filename);
fd = open(filename, O_WRONLY|O_CREAT|O_TRUNC, 0644);
if (fd == -1)
- err(1, filename);
+ err(1, "%s", filename);
rlen = write(fd, header, hlen);
if (rlen == -1)
diff --git a/sys/dev/microcode/myx/build.c b/sys/dev/microcode/myx/build.c
index 5c530992524..ba24b5716be 100644
--- a/sys/dev/microcode/myx/build.c
+++ b/sys/dev/microcode/myx/build.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: build.c,v 1.4 2014/07/12 19:01:49 tedu Exp $ */
+/* $OpenBSD: build.c,v 1.5 2017/08/27 08:15:48 otto Exp $ */
/*
* Copyright (c) 2007 Reyk Floeter <reyk@openbsd.org>
@@ -46,7 +46,7 @@ myx_build_firmware(u_int8_t *fw, size_t len, size_t ulen, const char *file)
f = fopen(file, "w");
if (f == NULL)
- err(1, file);
+ err(1, "%s", file);
ufw = malloc(ulen);
if (ufw == NULL)