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:
Sami Kerola 2012-12-20 20:04:06 +00:00
parent 70c65f4d59
commit 4051a953bd
2 changed files with 2 additions and 3 deletions

View file

@ -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

View file

@ -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);
}