mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-16 07:47:00 +00:00
smatch scan: fix few warnings
dhcpd-pools.h:79:17: warning: comma at end of enumerator list [-pedantic] hash.c:85 delete_lease() info: redundant null check on lease->ethernet calling free() Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
70c65f4d59
commit
4051a953bd
2 changed files with 2 additions and 3 deletions
|
|
@ -76,7 +76,7 @@ union ipaddr_t {
|
|||
enum dhcp_version {
|
||||
VERSION_4,
|
||||
VERSION_6,
|
||||
VERSION_UNKNOWN,
|
||||
VERSION_UNKNOWN
|
||||
};
|
||||
/*! \enum prefix_t
|
||||
* \brief Enumeration of interesting data in dhcpd.leases file, that has
|
||||
|
|
|
|||
|
|
@ -81,8 +81,7 @@ struct leases_t *find_lease(union ipaddr_t *addr)
|
|||
* \param lease Pointer to lease hash. */
|
||||
void delete_lease(struct leases_t *lease)
|
||||
{
|
||||
if (lease->ethernet != NULL)
|
||||
free(lease->ethernet);
|
||||
free(lease->ethernet);
|
||||
HASH_DEL(leases, lease);
|
||||
free(lease);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue