Changeset 728:6169b4c5b256 in freeDiameter
- Timestamp:
- Feb 24, 2011, 10:48:05 AM (13 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/dbg_interactive/events.i
r640 r728 46 46 } 47 47 fd->code = code; 48 fd->data = STRING; /* Should maybe malloc it ? */ 48 fd->data = os0dup(STRING, LENGTH); 49 if (!fd->data) { 50 DI_ERROR_MALLOC; 51 return NULL; 52 }; 49 53 fd->size = LENGTH; 50 54 return fd; 51 55 } 56 57 fd_event(int code, int value) { 58 struct fd_event * fd = calloc(1, sizeof(struct fd_event)); 59 if (!fd) { 60 DI_ERROR_MALLOC; 61 return NULL; 62 } 63 fd->code = code; 64 fd->data = malloc(sizeof(int)); 65 if (!fd->data) { 66 DI_ERROR_MALLOC; 67 return NULL; 68 }; 69 *((int *)fd->data) = value; 70 fd->size = sizeof(int); 71 return fd; 72 } 52 73 }
Note: See TracChangeset
for help on using the changeset viewer.