From: op Date: Tue, 24 May 2022 16:42:19 +0000 (+0000) Subject: fix some dobeep_msgs calls X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5283ca6853f4800ebb2169f1734e8b977be54ea0;p=openbsd 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@ --- 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"));