/* construct path relative to install directory only */
pathSize += strlen(cpath);
- newPath = (char *)malloc(pathSize);
+ newPath = malloc(pathSize);
if (!newPath) {
status = ENOMEM;
} else {
/* construct path relative to 'relativeTo' (and install dir) */
pathSize += strlen(relativeTo) + 1 + strlen(cpath);
- newPath = (char *)malloc(pathSize);
+ newPath = malloc(pathSize);
if (!newPath) {
status = ENOMEM;
} else {
{
bufio_p bp;
- bp = (bufio_p) malloc(sizeof(bufio_t));
+ bp = malloc(sizeof(bufio_t));
if (bp == NULL) {
return NULL;
}
if (saveTmpDir == NULL) {
/* initialize global temporary directory string */
- char *dirp = (char *)malloc(MAX_PATH+1);
+ char *dirp = malloc(MAX_PATH+1);
int freeDirp = 1;
if (dirp != NULL) {
char **CellContents=NULL;
int i;
- if ( (CellContents=(char **) malloc( sizeof(char *) * Table->numColumns))\
- == NULL ) {
+ if ( (CellContents=malloc( sizeof(char *) * Table->numColumns))== NULL ) {
fprintf(stderr,"Internal Error. Cannot allocate memory for new CellContents-array.\n");
exit(EXIT_FAILURE);
}
for (i=0;i<Table->numColumns;i++) {
- if ( (CellContents[i]=(char *) malloc(UTIL_T_MAX_CELLCONTENT_LEN)) == NULL) {
+ if ( (CellContents[i]=malloc(UTIL_T_MAX_CELLCONTENT_LEN)) == NULL) {
fprintf(stderr,\
"Internal Error. Cannot allocate memory for new CellContents-array.\n");
exit(EXIT_FAILURE);
newTableRow(struct util_Table* Table) {
struct util_TableRow *aRow =NULL;
- if ( (aRow= (struct util_TableRow*) malloc(sizeof(struct util_TableRow))) == NULL) {
+ if ( (aRow = malloc(sizeof(struct util_TableRow))) == NULL) {
fprintf(stderr,\
"Internal Error. Cannot allocate memory for new TableRow.\n");
exit(EXIT_FAILURE);
int ret = 0;
struct afs_work_queue_node * node;
- *node_out = node = (struct afs_work_queue_node *) malloc(sizeof(*node));
+ *node_out = node = malloc(sizeof(*node));
if (node == NULL) {
ret = ENOMEM;
goto error;