Made changes so that it doesnt call dbCalloc

This commit is contained in:
Marty Kraimer
1995-08-17 14:48:02 +00:00
parent 6eb04984bd
commit b0e9cc9fba
2 changed files with 28 additions and 10 deletions

View File

@@ -139,10 +139,14 @@ int errSymBld()
if(initialized) return(0);
hashtable = (ERRNUMNODE**)calloc(NHASH, sizeof(ERRNUMNODE*));
if (!hashtable) {
return -1;
if(!hashtable) {
printf("errSymBld: Can't allocate storage\n");
#ifdef vxWorks
taskSuspend(0);
#else
abort();
#endif
}
for (i = 0; i < errSymTbl->nsymbols; i++, errArray++) {
modnum = errArray->errNum >> 16;
if (modnum < 501) {
@@ -212,8 +216,13 @@ char *name;
ERRNUMNODE *pNew;
pNew = (ERRNUMNODE*)calloc(1, sizeof(ERRNUMNODE));
if (!pNew) {
return -1;
if(!pNew) {
printf("errSymbolAdd: Can't allocate storage\n");
#ifdef vxWorks
taskSuspend(0);
#else
abort();
#endif
}
pNew->errNum = errNum;
pNew->message = name;

View File

@@ -139,10 +139,14 @@ int errSymBld()
if(initialized) return(0);
hashtable = (ERRNUMNODE**)calloc(NHASH, sizeof(ERRNUMNODE*));
if (!hashtable) {
return -1;
if(!hashtable) {
printf("errSymBld: Can't allocate storage\n");
#ifdef vxWorks
taskSuspend(0);
#else
abort();
#endif
}
for (i = 0; i < errSymTbl->nsymbols; i++, errArray++) {
modnum = errArray->errNum >> 16;
if (modnum < 501) {
@@ -212,8 +216,13 @@ char *name;
ERRNUMNODE *pNew;
pNew = (ERRNUMNODE*)calloc(1, sizeof(ERRNUMNODE));
if (!pNew) {
return -1;
if(!pNew) {
printf("errSymbolAdd: Can't allocate storage\n");
#ifdef vxWorks
taskSuspend(0);
#else
abort();
#endif
}
pNew->errNum = errNum;
pNew->message = name;