mirror of
https://git.openafs.org/openafs.git
synced 2025-01-20 16:00:12 +00:00
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:
parent
695e3a028e
commit
1c734bd7e5
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user