diff options
author | Omar Polo <op@cvs.openbsd.org> | 2023-03-30 22:56:48 +0000 |
---|---|---|
committer | Omar Polo <op@cvs.openbsd.org> | 2023-03-30 22:56:48 +0000 |
commit | 131324254a4242904ab44228f2167db8a64ef1bf (patch) | |
tree | 59809cc5906a8222668d8aec7f21ebbff4f53df9 /usr.bin | |
parent | d84489445ce4d6f9f5774dc6ab7ff07f058dec3e (diff) |
drop unnecessary copy of fname; ok tb@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/mg/extend.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.bin/mg/extend.c b/usr.bin/mg/extend.c index 5b88dfd61ef..e5ab9aea9a3 100644 --- a/usr.bin/mg/extend.c +++ b/usr.bin/mg/extend.c @@ -1,4 +1,4 @@ -/* $OpenBSD: extend.c,v 1.78 2023/03/30 19:00:02 op Exp $ */ +/* $OpenBSD: extend.c,v 1.79 2023/03/30 22:56:47 op Exp $ */ /* This file is in the public domain. */ /* @@ -649,10 +649,8 @@ load(FILE *ffp, const char *fname) { int s = TRUE, line; int nbytes = 0; - char excbuf[BUFSIZE], fncpy[NFILEN]; + char excbuf[BUFSIZE]; - /* keep a note of fname in case of errors in loaded file. */ - (void)strlcpy(fncpy, fname, sizeof(fncpy)); line = 0; while ((s = ffgetline(ffp, excbuf, sizeof(excbuf) - 1, &nbytes)) == FIOSUC) { @@ -661,7 +659,7 @@ load(FILE *ffp, const char *fname) if (excline(excbuf, nbytes, line) != TRUE) { s = FIOERR; dobeep(); - ewprintf("Error loading file %s at line %d", fncpy, line); + ewprintf("Error loading file %s at line %d", fname, line); break; } } |