ppp: Use nitems(foo) instead of sizeof(foo)/sizeof(foo[0])

Pull Request: https://github.com/freebsd/freebsd-src/pull/888
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
This commit is contained in:
Elyes Haouas 2023-11-07 18:13:19 +01:00 committed by Warner Losh
parent bccbb2fc4b
commit 67db7b43d0

View File

@ -26,6 +26,8 @@
* SUCH DAMAGE.
*/
#include <sys/param.h>
#define CHAT_EXPECT 0
#define CHAT_SEND 1
#define CHAT_DONE 2
@ -74,7 +76,7 @@ struct chat {
#define descriptor2chat(d) \
((d)->type == CHAT_DESCRIPTOR ? (struct chat *)(d) : NULL)
#define VECSIZE(v) (sizeof(v) / sizeof(v[0]))
#define VECSIZE(v) nitems(v)
extern void chat_Init(struct chat *, struct physical *);
extern int chat_Setup(struct chat *, const char *, const char *);