tcpdump mailing list archives
libpcap lint
From: David Young <dyoung () pobox com>
Date: Thu, 23 Sep 2004 14:24:44 -0500
libpcap has a lot of lint. In gencode.c, some patterns stand out: 1) Lots of unreachable break statements after return statements; why not drop the break statements? 2) "Assignment of negative constant to unsigned type", usually assignments of the type "off_linktype = -1;" where off_linktype is a u_int. It looks to me like UINT_MAX is intended. Am I missing something? I suggest #define OFF_UNDEFINED UINT_MAX . . . off_linktype = OFF_UNDEFINED; 3) Zillions of lint messages could be suppressed if bpf_error() and abort() calls were followed by /*NOTREACHED*/ I will send a patch that gets rid of the lint. Dave -- David Young OJC Technologies dyoung () ojctech com Urbana, IL * (217) 278-3933 - This is the tcpdump-workers list. Visit https://lists.sandelman.ca/ to unsubscribe.
Current thread:
- libpcap lint David Young (Sep 23)