Use NUM_TIME_EVENTS instead of hard constants for dbScan.c event code.
This commit is contained in:
1 parent
005e36258d
commit
fc8319ad10
1 file changed
+3
-2
@@ -27,6 +27,7 @@
|
||||
#include "ellLib.h"
|
||||
#include "epicsAtomic.h"
|
||||
#include "epicsEvent.h"
|
||||
#include "epicsGeneralTime.h"
|
||||
#include "epicsMutex.h"
|
||||
#include "epicsPrint.h"
|
||||
#include "epicsRingBytes.h"
|
||||
@@ -114,7 +115,7 @@ typedef struct event_list {
|
||||
struct event_list *next;
|
||||
char eventname[1]; /* actually arbitrary size */
|
||||
} event_list;
|
||||
static event_list * volatile pevent_list[256];
|
||||
static event_list * volatile pevent_list[NUM_TIME_EVENTS];
|
||||
static epicsMutexId event_lock;
|
||||
|
||||
/* IO_EVENT*/
|
||||
@@ -546,7 +547,7 @@ void postEvent(event_list *pel)
|
||||
/* backward compatibility */
|
||||
void post_event(int event)
|
||||
{
|
||||
if (event <= 0 || event > 255) return;
|
||||
if (event <= 0 || event >= NUM_TIME_EVENTS) return;
|
||||
postEvent(pevent_list[event]);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user