diff options
author | Elyes Haouas <ehaouas@noos.fr> | 2023-11-07 17:13:19 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2024-04-29 03:30:55 +0000 |
commit | 67db7b43d07e9b29564f6b4734f8d2e975cc805c (patch) | |
tree | 85a433e76c1d19785a999b7bd6923b87b14a4fe8 | |
parent | bccbb2fc4bce6c3efc1ba93f222de320db8e020a (diff) | |
download | src-67db7b43d07e9b29564f6b4734f8d2e975cc805c.tar.gz src-67db7b43d07e9b29564f6b4734f8d2e975cc805c.zip |
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>
-rw-r--r-- | usr.sbin/ppp/chat.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/ppp/chat.h b/usr.sbin/ppp/chat.h index 54e86834be60..c8fcf9a9c3cc 100644 --- a/usr.sbin/ppp/chat.h +++ b/usr.sbin/ppp/chat.h @@ -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 *); |