Typecast to get rid of warnings that array index into types[] is a char.
authorDan Harkless <dan@harkless.org>
Tue, 25 Jan 2000 05:50:12 +0000 (05:50 +0000)
committerDan Harkless <dan@harkless.org>
Tue, 25 Jan 2000 05:50:12 +0000 (05:50 +0000)
uip/vmhsbr.c

index c874395..4a2b951 100644 (file)
@@ -106,7 +106,7 @@ peer2rc (struct record *rc)
     if (fp) {
        fseek (fp, 0L, SEEK_END);
        fprintf (fp, "%d: <--- %s %d: \"%*.*s\"\n", (int) getpid(),
-               types[rc->rc_type], rc->rc_len,
+               types[(int)rc->rc_type], rc->rc_len,
                rc->rc_len, rc->rc_len, rc->rc_data);
        fflush (fp);
     }
@@ -127,7 +127,7 @@ rc2peer (char code, int len, char *data)
     if (fp) {
        fseek (fp, 0L, SEEK_END);
        fprintf (fp, "%d: ---> %s %d: \"%*.*s\"\n", (int) getpid(),
-               types[rc->rc_type], rc->rc_len,
+               types[(int)rc->rc_type], rc->rc_len,
                rc->rc_len, rc->rc_len, data);
        fflush (fp);
     }