FACT++  1.0
IntItem* fillIntItem ( int *  intLocation,
char *  itemName,
int  defDeadband 
)

Definition at line 3514 of file feeserver.c.

References createIntItem(), Memory::free(), and Memory::malloc().

3514  {
3515  IntItem* intItem = 0;
3516 
3517  intItem = createIntItem();
3518  if (intItem == 0) {
3519  //no memory available!
3520 # ifdef __DEBUG
3521  printf("no memory available!\n");
3522 # endif
3523  return 0;
3524  }
3525  intItem->location = intLocation;
3526  intItem->name = (char*) malloc(strlen(itemName) + 1);
3527  if (intItem->name == 0) {
3528  //no memory available!
3529 # ifdef __DEBUG
3530  printf("no memory available!\n");
3531 # endif
3532  free(intItem);
3533  return 0;
3534  }
3535  strcpy(intItem->name, itemName);
3536  intItem->defaultDeadband = defDeadband;
3537  return intItem;
3538 }
void * malloc()
Definition: EventBuilder.cc:99
void free(void *mem)
IntItem * createIntItem()
Definition: feeserver.c:3471

+ Here is the call graph for this function: