msg->len, msg->notify.data);
if (buflen != len) {
- buf = TALLOC_REALLOC(send_ctx, buf, len);
+ buf = (char *)TALLOC_REALLOC(send_ctx, buf, len);
if (!buf)
return False;
buflen = len;
}
offset += 4; /* For count. */
- buf = TALLOC(send_ctx, offset);
+ buf = (char *)TALLOC(send_ctx, offset);
if (!buf) {
DEBUG(0,("print_notify_send_messages: Out of memory\n"));
talloc_free_children(send_ctx);
memcpy( to, from, sizeof(SPOOLSS_NOTIFY_MSG) );
if ( from->len ) {
- to->notify.data = TALLOC_MEMDUP(send_ctx, from->notify.data, from->len );
+ to->notify.data = (char *)TALLOC_MEMDUP(send_ctx, from->notify.data, from->len );
if ( !to->notify.data ) {
DEBUG(0,("copy_notify2_msg: talloc_memdup() of size [%d] failed!\n", from->len ));
return False;
char *buf = NULL;
ssize_t byte_count;
- if ((buf=SMB_MALLOC(PE_HEADER_SIZE)) == NULL) {
+ if ((buf=(char *)SMB_MALLOC(PE_HEADER_SIZE)) == NULL) {
DEBUG(0,("get_file_version: PE file [%s] PE Header malloc failed bytes = %d\n",
fname, PE_HEADER_SIZE));
goto error_exit;
goto error_exit;
SAFE_FREE(buf);
- if ((buf=SMB_MALLOC(section_table_bytes)) == NULL) {
+ if ((buf=(char *)SMB_MALLOC(section_table_bytes)) == NULL) {
DEBUG(0,("get_file_version: PE file [%s] section table malloc failed bytes = %d\n",
fname, section_table_bytes));
goto error_exit;
goto error_exit;
SAFE_FREE(buf);
- if ((buf=SMB_MALLOC(section_bytes)) == NULL) {
+ if ((buf=(char *)SMB_MALLOC(section_bytes)) == NULL) {
DEBUG(0,("get_file_version: PE file [%s] version malloc failed bytes = %d\n",
fname, section_bytes));
goto error_exit;
/* Allocate a bit more space to speed up things */
SAFE_FREE(buf);
- if ((buf=SMB_MALLOC(VS_NE_BUF_SIZE)) == NULL) {
+ if ((buf=(char *)SMB_MALLOC(VS_NE_BUF_SIZE)) == NULL) {
DEBUG(0,("get_file_version: NE file [%s] malloc failed bytes = %d\n",
fname, PE_HEADER_SIZE));
goto error_exit;
memset(info.dependentfiles, '\0', 2*sizeof(fstring));
fstrcpy(info.dependentfiles[0], "");
- *info_ptr = memdup(&info, sizeof(info));
+ *info_ptr = (NT_PRINTER_DRIVER_INFO_LEVEL_3 *)memdup(&info, sizeof(info));
if (!*info_ptr) {
SAFE_FREE(info.dependentfiles);
return WERR_NOMEM;
new_nt_devicemode->nt_dev_private = NULL;
if (nt_devicemode->nt_dev_private != NULL) {
- if ((new_nt_devicemode->nt_dev_private = memdup(nt_devicemode->nt_dev_private, nt_devicemode->driverextra)) == NULL) {
+ if ((new_nt_devicemode->nt_dev_private = (uint8 *)memdup(nt_devicemode->nt_dev_private, nt_devicemode->driverextra)) == NULL) {
SAFE_FREE(new_nt_devicemode);
DEBUG(0,("dup_nt_devicemode: malloc fail.\n"));
return NULL;
/* We use ldap_get_dn here as we need the answer
* in utf8 to call ldap_explode_dn(). JRA. */
- srv_dn_utf8 = ldap_get_dn(ads->ld, res);
+ srv_dn_utf8 = ldap_get_dn((LDAP *)ads->ld, (LDAPMessage *)res);
if (!srv_dn_utf8) {
ads_destroy(&ads);
return WERR_SERVER_UNAVAILABLE;
TDB_DATA ret;
SIVAL(&j, 0, jobid);
- ret.dptr = (void *)&j;
+ ret.dptr = (char *)&j;
ret.dsize = sizeof(j);
return ret;
}
}
SIVAL( buffer, 0, updating_pid);
- data.dptr = (void *)buffer;
+ data.dptr = (char *)buffer;
data.dsize = 4; /* we always assume this is a 4 byte value */
tdb_store(pdb->tdb, key, data, TDB_REPLACE);
queue[i].fs_file);
}
- if ((data.dptr = SMB_MALLOC(data.dsize)) == NULL)
+ if ((data.dptr = (char *)SMB_MALLOC(data.dsize)) == NULL)
return;
len = 0;
key.dsize = strlen(keystr);
status.qcount = qcount;
- data.dptr = (void *)&status;
+ data.dptr = (char *)&status;
data.dsize = sizeof(status);
tdb_store(pdb->tdb, key, data, TDB_REPLACE);
int printing_type;
size_t len;
- len = tdb_unpack( buf, msglen, "fdPP",
+ len = tdb_unpack( (char *)buf, msglen, "fdPP",
sharename,
&printing_type,
lpqcommand,
if (i == data.dsize) {
/* We weren't in the list. Realloc. */
- data.dptr = SMB_REALLOC(data.dptr, data.dsize + 8);
+ data.dptr = (char *)SMB_REALLOC(data.dptr, data.dsize + 8);
if (!data.dptr) {
DEBUG(0,("print_notify_register_pid: Relloc fail for printer %s\n",
printername));