#include <afs/budb_prototypes.h>
#include <afs/butc.h>
#include <afs/bubasics.h> /* PA */
+#include <afs/afsint.h>
#include <afs/volser.h>
#include <afs/voldefs.h> /* PA */
#include <afs/vldbint.h> /* PA */
ERROR(BC_NOMEM);
}
- tvd->name = (char *)malloc(strlen(entries[e].name) + 10);
+ tvd->name = malloc(strlen(entries[e].name) + 10);
if (!(tvd->name)) {
afs_com_err(whoami, BC_NOMEM, NULL);
free(tvd);
return (BC_NOMEM);
}
- tvd->name = (char *)malloc(strlen(entry.name) + 10);
+ tvd->name = malloc(strlen(entry.name) + 10);
if (!(tvd->name)) {
afs_com_err(whoami, BC_NOMEM, NULL);
free(tvd);
return (NULL);
}
- string = (char *)malloc(length); /* allocate the string */
+ string = malloc(length); /* allocate the string */
if (!string) {
afs_com_err(whoami, BC_NOMEM, NULL);
return (NULL);
}
/* specified other destination host */
- if (as->parms[0].items) {
- tp = as->parms[0].items->data;
- if (bc_ParseHost(tp, &destServ)) {
- afs_com_err(whoami, 0, "Failed to locate destination host '%s'", tp);
- return -1;
- }
+ tp = as->parms[0].items->data;
+ if (bc_ParseHost(tp, &destServ)) {
+ afs_com_err(whoami, 0, "Failed to locate destination host '%s'", tp);
+ return -1;
}
/* specified other destination partition */
- if (as->parms[1].items) {
- tp = as->parms[1].items->data;
- if (bc_GetPartitionID(tp, &destPartition)) {
- afs_com_err(whoami, 0, "Can't parse destination partition '%s'", tp);
- return -1;
- }
+ tp = as->parms[1].items->data;
+ if (bc_GetPartitionID(tp, &destPartition)) {
+ afs_com_err(whoami, 0, "Can't parse destination partition '%s'", tp);
+ return -1;
}
for (ti = as->parms[2].items; ti; ti = ti->next) {
return BC_NOMEM;
}
- tvol->name = (char *)malloc(VOLSER_MAXVOLNAME + 1);
+ tvol->name = malloc(VOLSER_MAXVOLNAME + 1);
if (!tvol->name) {
afs_com_err(whoami, BC_NOMEM, NULL);
return BC_NOMEM;
if (as->parms[5].items) {
for (ti = as->parms[5].items; ti; ti = ti->next)
portCount++;
- ports = (afs_int32 *) malloc(portCount * sizeof(afs_int32));
+ ports = malloc(portCount * sizeof(afs_int32));
if (!ports) {
afs_com_err(whoami, BC_NOMEM, NULL);
return BC_NOMEM;
if (as->parms[2].items) {
for (ti = as->parms[2].items; ti; ti = ti->next)
portCount++;
- ports = (afs_int32 *) malloc(portCount * sizeof(afs_int32));
+ ports = malloc(portCount * sizeof(afs_int32));
if (!ports) {
afs_com_err(whoami, BC_NOMEM, NULL);
return BC_NOMEM;
/* Allocate a volumeDump structure and link it in */
tvol = calloc(1, sizeof(struct bc_volumeDump));
- tvol->name = (char *)malloc(VOLSER_MAXVOLNAME + 1);
+ tvol->name = malloc(VOLSER_MAXVOLNAME + 1);
if (!tvol->name) {
afs_com_err(whoami, BC_NOMEM, NULL);
return BC_NOMEM;
if (as->parms[2].items) {
for (ti = as->parms[2].items; ti; ti = ti->next)
portCount++;
- ports = (afs_int32 *) malloc(portCount * sizeof(afs_int32));
+ ports = malloc(portCount * sizeof(afs_int32));
if (!ports) {
afs_com_err(whoami, BC_NOMEM, NULL);
return BC_NOMEM;
/* get the port number, if one was specified */
if (as->parms[2].items) {
- portp = (afs_int32 *) malloc(sizeof(afs_int32));
+ portp = malloc(sizeof(afs_int32));
if (!portp) {
afs_com_err(whoami, BC_NOMEM, NULL);
return BC_NOMEM;
sprintf(statusPtr->taskName, "Scheduled Dump");
statusPtr->jobNumber = bc_jobNumber();
statusPtr->scheduledDump = atTime;
- statusPtr->cmdLine = (char *)malloc(length);
+ statusPtr->cmdLine = malloc(length);
if (!statusPtr->cmdLine) {
afs_com_err(whoami, BC_NOMEM, NULL);
return BC_NOMEM;
havetime = 1;
}
- port = (as->parms[3].items ? getPortOffset(as->parms[3].items->data) : 0); /* -port */
+ port = (as->parms[3].items ? getPortOffset(as->parms[3].items->data) : 0); /* -portoffset */
if (as->parms[5].items) /* -dbonly */
port = -1;