mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-29 21:26:51 +00:00
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:
parent
bccbb2fc4b
commit
67db7b43d0
|
@ -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 *);
|
||||
|
|
Loading…
Reference in a new issue