1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-27 04:32:55 +00:00

Confirm pointer is not null and use sizeof object instead of struct

This commit is contained in:
Mithil Poojary 2020-10-03 04:11:49 +05:30 committed by Brenden Matthews
parent ddb70b4ba9
commit 6bda01266b

View File

@ -92,7 +92,7 @@ PRSS::~PRSS() {
}
static inline void prss_null_item(PRSS_Item *i) {
memset(i, 0, sizeof(PRSS_Item));
if (i != nullptr) { memset(i, 0, sizeof(*i)); }
}
static inline void read_item(PRSS_Item *res, xmlNodePtr data) {