From 5283ca6853f4800ebb2169f1734e8b977be54ea0 Mon Sep 17 00:00:00 2001 From: op Date: Tue, 24 May 2022 16:42:19 +0000 Subject: [PATCH] fix some dobeep_msgs calls dobeep_msgs isn't printf-like: it just prints the two arguments separated by a space. When it was introduced, some calls from ewprintf were incorrectly translated and the "%s" remained. ok florian@ --- usr.bin/mg/basic.c | 4 ++-- usr.bin/mg/cscope.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/usr.bin/mg/basic.c b/usr.bin/mg/basic.c index 251e7e8185b..3b92935f290 100644 --- a/usr.bin/mg/basic.c +++ b/usr.bin/mg/basic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: basic.c,v 1.50 2021/02/27 13:24:52 lum Exp $ */ +/* $OpenBSD: basic.c,v 1.51 2022/05/24 16:42:19 op Exp $ */ /* This file is in the public domain */ @@ -536,7 +536,7 @@ gotoline(int f, int n) return (ABORT); n = (int)strtonum(buf, INT_MIN, INT_MAX, &err); if (err) - return(dobeep_msgs("Line number %s", err)); + return(dobeep_msgs("Line number", err)); } return(setlineno(n)); } diff --git a/usr.bin/mg/cscope.c b/usr.bin/mg/cscope.c index 9ad06e49bc7..92f086e1068 100644 --- a/usr.bin/mg/cscope.c +++ b/usr.bin/mg/cscope.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cscope.c,v 1.20 2021/03/01 10:51:14 lum Exp $ */ +/* $OpenBSD: cscope.c,v 1.21 2022/05/24 16:42:19 op Exp $ */ /* * This file is in the public domain. @@ -185,9 +185,9 @@ cscreatelist(int f, int n) return (FALSE); if (stat(dir, &sb) == -1) - return(dobeep_msgs("stat: %s", strerror(errno))); + return(dobeep_msgs("stat:", strerror(errno))); else if (S_ISDIR(sb.st_mode) == 0) - return(dobeep_msgs("%s: Not a directory", dir)); + return(dobeep_msgs(dir, "Not a directory")); if (csexists("cscope-indexer") == FALSE) return(dobeep_msg("no such file or directory, cscope-indexer")); -- 2.20.1