From a1a9e7f1909a21b98a6b21a660d5bc9bd9f11f81 Mon Sep 17 00:00:00 2001 From: short <> Date: Thu, 14 Mar 2002 00:45:24 +0000 Subject: [PATCH] Another workaround of m68k-pic32-coff-gcc local-initialized-variable bug --- common/data/virtmodem.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/common/data/virtmodem.c b/common/data/virtmodem.c index c421fd1..f6f1f3e 100644 --- a/common/data/virtmodem.c +++ b/common/data/virtmodem.c @@ -343,8 +343,11 @@ static int VM_GetMasterPty(char **name) { /* search for an unused pty */ for (i=0; i<16 && master <= 0; i++) { for (j=0; j<16 && master <= 0; j++) { - (*name)[8] = "pqrstuvwxyzPQRST"[i]; - (*name)[9] = "0123456789abcdef"[j]; +static const char *ptyp8="pqrstuvwxyzPQRST"; +static const char *ptyp9="0123456789abcdef"; + + (*name)[8] = ptyp8[i]; + (*name)[9] = ptyp9[j]; /* open the master pty */ if ((master = open(*name, O_RDWR | O_NOCTTY | O_NONBLOCK )) < 0) { if (errno == ENOENT) { -- 1.8.3.1