I7094: Fixed GET_PCHAIN macro (COVERITY)

This commit is contained in:
Bob Supnik 2017-03-14 04:47:27 -07:00 committed by Mark Pizzolato
parent 0c03efb560
commit b95e8704d2

View file

@ -1,6 +1,6 @@
/* i7094_lp.c: IBM 716 line printer simulator /* i7094_lp.c: IBM 716 line printer simulator
Copyright (c) 2003-2012, Robert M. Supnik Copyright (c) 2003-2017, Robert M. Supnik
Permission is hereby granted, free of charge, to any person obtaining a Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"), copy of this software and associated documentation files (the "Software"),
@ -25,6 +25,7 @@
lpt 716 line printer lpt 716 line printer
13-Mar-17 RMS Fixed GET_PCHAIN macro (COVERITY)
19-Jan-07 RMS Added UNIT_TEXT flag 19-Jan-07 RMS Added UNIT_TEXT flag
Internally, the 7094 works only with column binary and is limited to Internally, the 7094 works only with column binary and is limited to
@ -55,7 +56,7 @@
#define UNIT_V_48 (UNIT_V_UF + 2) #define UNIT_V_48 (UNIT_V_UF + 2)
#define UNIT_BZ (1 << UNIT_V_BZ) #define UNIT_BZ (1 << UNIT_V_BZ)
#define UNIT_48 (1 << UNIT_V_48) #define UNIT_48 (1 << UNIT_V_48)
#define GET_PCHAIN(x) (((x) >> UNIT_V_BZ) & (UNIT_BZ|UNIT_48)) #define GET_PCHAIN(x) (((x) >> UNIT_V_BZ) & 03)
#define LPT_BINLNT 24 /* bin buffer length */ #define LPT_BINLNT 24 /* bin buffer length */
#define LPT_ECHLNT 22 /* echo buffer length */ #define LPT_ECHLNT 22 /* echo buffer length */
@ -95,7 +96,6 @@ uint32 lpt_chob_v = 0;
t_uint64 lpt_bbuf[LPT_BINLNT]; /* binary buffer */ t_uint64 lpt_bbuf[LPT_BINLNT]; /* binary buffer */
t_uint64 lpt_ebuf[LPT_ECHLNT]; /* echo buffer */ t_uint64 lpt_ebuf[LPT_ECHLNT]; /* echo buffer */
/* Echo ordering map */ /* Echo ordering map */
static const uint8 echo_map[LPT_BINLNT + LPT_ECHLNT] = { static const uint8 echo_map[LPT_BINLNT + LPT_ECHLNT] = {