mirror of https://github.com/OpenVPN/openvpn-gui
added define get an array element count
parent
66280bca2c
commit
4003caca8a
2
main.h
2
main.h
|
@ -58,6 +58,8 @@ struct security_attributes
|
||||||
SECURITY_DESCRIPTOR sd;
|
SECURITY_DESCRIPTOR sd;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Return the number of elements in an array */
|
||||||
|
#define ELEMENTS(x) sizeof(x)/sizeof(*(x))
|
||||||
|
|
||||||
/* clear an object */
|
/* clear an object */
|
||||||
#define CLEAR(x) memset(&(x), 0, sizeof(x))
|
#define CLEAR(x) memset(&(x), 0, sizeof(x))
|
||||||
|
|
Loading…
Reference in New Issue