forked from osmocom/wireshark
Don't cast away constness if you don't have to.
Change-Id: Ib6bf70c8d222d1c31681535689d2372178df3b80 Reviewed-on: https://code.wireshark.org/review/32463 Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
c40e18b252
commit
5a7e0b6350
|
@ -144,7 +144,7 @@ static int sdj_dump_entries(sd_journal *jnl, FILE* fp)
|
|||
g_debug("Breaking on binary field: %u + %zd", data_end, fld_len);
|
||||
break;
|
||||
}
|
||||
ptrdiff_t name_len = eq_ptr - (guint8 *) fld_data;
|
||||
ptrdiff_t name_len = eq_ptr - (const guint8 *) fld_data;
|
||||
uint64_t le_data_len;
|
||||
le_data_len = htole64(fld_len - name_len - 1);
|
||||
memcpy(entry_buff+data_end, fld_data, name_len);
|
||||
|
@ -153,7 +153,7 @@ static int sdj_dump_entries(sd_journal *jnl, FILE* fp)
|
|||
data_end++;
|
||||
memcpy(entry_buff+data_end, &le_data_len, 8);
|
||||
data_end += 8;
|
||||
memcpy(entry_buff+data_end, (guint8 *) fld_data + name_len + 1, fld_len - name_len);
|
||||
memcpy(entry_buff+data_end, (const guint8 *) fld_data + name_len + 1, fld_len - name_len);
|
||||
data_end += fld_len - name_len;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue