flow/storage: use const for getter

pull/8042/head
Victor Julien 3 years ago
parent 99fd69ee8c
commit 55cf11fdc2

@ -36,7 +36,7 @@ unsigned int FlowStorageSize(void)
return StorageGetSize(STORAGE_FLOW);
}
void *FlowGetStorageById(Flow *f, FlowStorageId id)
void *FlowGetStorageById(const Flow *f, FlowStorageId id)
{
return StorageGetById((Storage *)((void *)f + sizeof(Flow)), STORAGE_FLOW, id.id);
}

@ -35,7 +35,7 @@ typedef struct FlowStorageId {
unsigned int FlowStorageSize(void);
void *FlowGetStorageById(Flow *h, FlowStorageId id);
void *FlowGetStorageById(const Flow *h, FlowStorageId id);
int FlowSetStorageById(Flow *h, FlowStorageId id, void *ptr);
void *FlowAllocStorageById(Flow *h, FlowStorageId id);

@ -767,7 +767,7 @@ static int CreateJSONEther(JsonBuilder *js, const Packet *p, const Flow *f)
} else if (f != NULL) {
/* we are creating an ether object in a flow context, so we need to
append to arrays */
MacSet *ms = FlowGetStorageById((Flow *)f, MacSetGetFlowStorageID());
MacSet *ms = FlowGetStorageById(f, MacSetGetFlowStorageID());
if (ms != NULL && MacSetSize(ms) > 0) {
jb_open_object(js, "ether");
JSONMACAddrInfo info;

Loading…
Cancel
Save