Fix two accidental overwrites of 'flags'.

When I came to actually remove the global 'flags' word, I found that I
got compile failures in two functions that should never have been
accessing it at all, because they forgot to declare _local_ variables
of the same name. Yikes!

(Of course, _now_ that's harmless, because I've just removed all the
actual semantics from the global variable. But I'm about to remove the
variable too, so these bugs would become compile failures.)
This commit is contained in:
Simon Tatham 2020-01-30 06:40:21 +00:00
Родитель e5f85fc269
Коммит 33715c07e3
2 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -15,6 +15,7 @@ struct sftp_packet *sftp_handle_request(
{
struct sftp_packet *reply;
unsigned id;
uint32_t flags;
ptrlen path, dstpath, handle, data;
uint64_t offset;
unsigned length;

Просмотреть файл

@ -1107,7 +1107,7 @@ static void x11font_enum_fonts(GtkWidget *widget,
* font, which we do by examining the spacing field
* again.
*/
flags = FONTFLAG_SERVERSIDE;
int flags = FONTFLAG_SERVERSIDE;
if (!strchr("CcMm", xlfd->spacing[0]))
flags |= FONTFLAG_NONMONOSPACED;