All callers had a cast from uint8_t to char, avoid those.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
push a 16 byte version of a file id into a buffer. This ignores the extid
and is needed when dev/inodes are stored in persistent storage (tdbs).
*/
-void push_file_id_16(char *buf, const struct file_id *id)
+void push_file_id_16(uint8_t *buf, const struct file_id *id)
{
SIVAL(buf, 0, id->devid&0xFFFFFFFF);
SIVAL(buf, 4, id->devid>>32);
/*
an allocated string for a file_id structure
*/
-void push_file_id_16(char *buf, const struct file_id *id);
+void push_file_id_16(uint8_t *buf, const struct file_id *id);
void push_file_id_24(char *buf, const struct file_id *id);
void pull_file_id_24(const char *buf, struct file_id *id);
TDB_DATA data;
/* For backwards compatibility only store the dev/inode. */
- push_file_id_16((char *)id_buf, id);
+ push_file_id_16(id_buf, id);
status = dbwrap_fetch(db_ctx, mem_ctx,
make_tdb_data(id_buf, sizeof(id_buf)),
uint8_t id_buf[16];
/* For backwards compatibility only store the dev/inode. */
- push_file_id_16((char *)id_buf, id);
+ push_file_id_16(id_buf, id);
return dbwrap_fetch_locked(db_ctx, mem_ctx,
make_tdb_data(id_buf, sizeof(id_buf)));
}
uint8_t id_buf[16];
/* For backwards compatibility only store the dev/inode. */
- push_file_id_16((char *)id_buf, &id);
+ push_file_id_16(id_buf, &id);
status = dbwrap_delete(db, make_tdb_data(id_buf, sizeof(id_buf)));
return status;
id = vfs_file_id_from_sbuf(handle->conn, &fsp->fsp_name->st);
/* For backwards compatibility only store the dev/inode. */
- push_file_id_16((char *)id_buf, &id);
+ push_file_id_16(id_buf, &id);
status = dbwrap_fetch(db,
ctx,
id = vfs_file_id_from_sbuf(handle->conn, &fsp->fsp_name->st);
/* For backwards compatibility only store the dev/inode. */
- push_file_id_16((char *)id_buf, &id);
+ push_file_id_16(id_buf, &id);
status = dbwrap_store(
db, make_tdb_data(id_buf, sizeof(id_buf)), data, 0);
}
/* For backwards compatibility only store the dev/inode. */
- push_file_id_16((char *)return_data, &fsp->file_id);
+ push_file_id_16(return_data, &fsp->file_id);
memcpy(return_data+16,create_volume_objectid(fsp->conn,objid),16);
- push_file_id_16((char *)return_data+32, &fsp->file_id);
+ push_file_id_16(return_data + 32, &fsp->file_id);
memset(return_data+48, 0, 16);
*_out_data = return_data;
return NT_STATUS_OK;
id = SMB_VFS_FILE_ID_CREATE(handle->conn, &base_sbuf_tmp);
- push_file_id_16((char *)id_buf, &id);
+ push_file_id_16(id_buf, &id);
hash = hash_fn(data_blob_const(id_buf, sizeof(id_buf)));