From e5d3a353cc21bd27a103fb4fc147cfc223517c21 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Mon, 22 Jul 2013 19:55:53 +0000 Subject: [PATCH] Remove the variable 'bufused', which came over from winnet.c in mistaken cut and paste and is just a bug. [originally from svn r9967] --- windows/winmisc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/windows/winmisc.c b/windows/winmisc.c index 525d52c5..c719c726 100644 --- a/windows/winmisc.c +++ b/windows/winmisc.c @@ -210,7 +210,7 @@ const char *win_strerror(int error) es = find234(errstrings, &error, errstring_find); if (!es) { - int bufsize, bufused; + int bufsize; es = snew(struct errstring); es->error = error; @@ -220,7 +220,7 @@ const char *win_strerror(int error) if (!FormatMessage((FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS), NULL, error, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - es->text + bufused, bufsize - bufused, NULL)) { + es->text, bufsize, NULL)) { sprintf(es->text, "Windows error code %d (and FormatMessage returned %d)", error, GetLastError());