git: 9d324b5ffc8a - main - mount: Don't pass a NULL format string to xo_err().

John Baldwin jhb at FreeBSD.org
Sat Sep 25 18:52:23 UTC 2021


The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=9d324b5ffc8a783ceff2a78dea19602a1d8f045a

commit 9d324b5ffc8a783ceff2a78dea19602a1d8f045a
Author:     John Baldwin <jhb at FreeBSD.org>
AuthorDate: 2021-09-25 18:51:01 +0000
Commit:     John Baldwin <jhb at FreeBSD.org>
CommitDate: 2021-09-25 18:52:10 +0000

    mount: Don't pass a NULL format string to xo_err().
    
    This fixes a -Wformat error from GCC 9.
    
    Fixes:          e725ee7eb672 mount: add libxo(3) support
---
 sbin/mount/mount.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c
index 02242791a7a2..80eda100c66f 100644
--- a/sbin/mount/mount.c
+++ b/sbin/mount/mount.c
@@ -192,7 +192,7 @@ specified_ro(const char *arg)
 
 	optbuf = strdup(arg);
 	if (optbuf == NULL)
-		 xo_err(1, NULL);
+		 xo_err(1, "strdup failed");
 
 	for (opt = optbuf; (opt = strtok(opt, ",")) != NULL; opt = NULL) {
 		if (strcmp(opt, "ro") == 0) {


More information about the dev-commits-src-main mailing list