xstat_cm_ProbeFreqInSecs = a_ProbeFreqInSecs;
xstat_cm_numCollections = a_numCollections;
collIDBytes = xstat_cm_numCollections * sizeof(afs_int32);
- xstat_cm_collIDP = (afs_int32 *) (malloc(collIDBytes));
+ xstat_cm_collIDP = malloc(collIDBytes);
memcpy(xstat_cm_collIDP, a_collIDP, collIDBytes);
if (xstat_cm_debug) {
printf("[%s] Asking for %d collection(s): ", rn,
* Allocate the necessary data structures and initialize everything
* else.
*/
- xstat_cm_ConnInfo = (struct xstat_cm_ConnectionInfo *)
- malloc(a_numServers * sizeof(struct xstat_cm_ConnectionInfo));
+ xstat_cm_ConnInfo = malloc(a_numServers
+ * sizeof(struct xstat_cm_ConnectionInfo));
if (xstat_cm_ConnInfo == (struct xstat_cm_ConnectionInfo *)0) {
fprintf(stderr,
"[%s] Can't allocate %d connection info structs (%" AFS_SIZET_FMT " bytes)\n",
if (debugging_on)
printf("%s: Allocating socket array for %d Cache Manager(s)\n", rn,
numCMs);
- CMSktArray = (struct sockaddr_in *)
- malloc(numCMs * sizeof(struct sockaddr_in));
+ CMSktArray = malloc(numCMs * sizeof(struct sockaddr_in));
if (CMSktArray == (struct sockaddr_in *)0) {
printf("%s: Can't allocate socket array for %d Cache Managers\n", rn,
numCMs);
*/
if (debugging_on)
printf("Allocating %d long(s) for coll ID\n", numCollIDs);
- collIDP = (afs_int32 *) (malloc(numCollIDs * sizeof(afs_int32)));
+ collIDP = malloc(numCollIDs * sizeof(afs_int32));
currCollIDP = collIDP;
curr_item = a_s->parms[P_COLL_IDS].items;
for (currCollIDIdx = 0; currCollIDIdx < numCollIDs; currCollIDIdx++) {
xstat_fs_ProbeFreqInSecs = a_ProbeFreqInSecs;
xstat_fs_numCollections = a_numCollections;
collIDBytes = xstat_fs_numCollections * sizeof(afs_int32);
- xstat_fs_collIDP = (afs_int32 *) (malloc(collIDBytes));
+ xstat_fs_collIDP = malloc(collIDBytes);
memcpy(xstat_fs_collIDP, a_collIDP, collIDBytes);
if (xstat_fs_debug) {
printf("[%s] Asking for %d collection(s): ", rn,
* Allocate the necessary data structures and initialize everything
* else.
*/
- xstat_fs_ConnInfo = (struct xstat_fs_ConnectionInfo *)
- malloc(a_numServers * sizeof(struct xstat_fs_ConnectionInfo));
+ xstat_fs_ConnInfo = malloc(a_numServers
+ * sizeof(struct xstat_fs_ConnectionInfo));
if (xstat_fs_ConnInfo == (struct xstat_fs_ConnectionInfo *)0) {
fprintf(stderr,
"[%s] Can't allocate %d connection info structs (%" AFS_SIZET_FMT " bytes)\n",
{
char *t_name;
- t_name = (char *)malloc(AFSNAMEMAX);
+ t_name = malloc(AFSNAMEMAX);
if (!t_name)
return ENOMEM;
strcpy(t_name, "This is xstat_fs");
*/
if (debugging_on)
printf("Allocating %d long(s) for coll ID\n", numCollIDs);
- collIDP = (afs_int32 *) (malloc(numCollIDs * sizeof(afs_int32)));
+ collIDP = malloc(numCollIDs * sizeof(afs_int32));
currCollIDP = collIDP;
curr_item = a_s->parms[P_COLL_IDS].items;
for (currCollIDIdx = 0; currCollIDIdx < numCollIDs; currCollIDIdx++) {