update: Don't cast returns from malloc()

malloc() returns a (void *) on all of our current platforms. So,
don't bother casting the return value before assigning it - it is
unnecessary noise.

Change-Id: I6a33ab25b092faa96c764f0a469d052c181344ee
Reviewed-on: http://gerrit.openafs.org/7471
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
This commit is contained in:
Simon Wilkinson 2012-05-17 13:31:53 +01:00 committed by Derrick Brashear
parent 695e3a028e
commit 1c734bd7e5
3 changed files with 3 additions and 3 deletions

View File

@ -472,7 +472,7 @@ update_ReceiveFile(int fd, struct rx_call *call, struct stat *status)
#else
blockSize = status->st_blksize;
#endif
buffer = (char *)malloc(blockSize);
buffer = malloc(blockSize);
if (!buffer) {
printf("malloc failed\n");
return UPDATE_ERROR;

View File

@ -400,7 +400,7 @@ update_SendFile(int fd, struct rx_call *call, struct stat *status)
blockSize = status->st_blksize;
#endif
length = status->st_size;
buffer = (char *)malloc(blockSize);
buffer = malloc(blockSize);
if (!buffer) {
printf("malloc failed\n");
return UPDATE_ERROR;

View File

@ -27,7 +27,7 @@ int
AddToList(struct filestr **ah, char *aname)
{
struct filestr *tf;
tf = (struct filestr *)malloc(sizeof(struct filestr));
tf = malloc(sizeof(struct filestr));
tf->next = *ah;
*ah = tf;
tf->name = strdup(aname);