Commit dd080034 authored by Adam Wujek's avatar Adam Wujek 💬

userspace/snmpd: update FIELD macro in wrsSnmp.h

Now in FIELD macro _struct doesn't have to be declared.
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent f7d750c7
......@@ -104,7 +104,7 @@ struct pickinfo {
#define FIELD(_struct, _type, _field) { \
.type = _type, \
.offset = offsetof(struct _struct, _field), \
.len = sizeof(_struct._field), \
.len = sizeof(((struct _struct *)0)->_field), \
}
#endif /* WRS_SNMP_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment