1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00

Remove the variable 'bufused', which came over from winnet.c in

mistaken cut and paste and is just a bug.

[originally from svn r9967]
This commit is contained in:
Simon Tatham 2013-07-22 19:55:53 +00:00
parent 5e2c794424
commit e5d3a353cc

View File

@ -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());