mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-17 08:16:59 +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 {
|
enum dhcp_version {
|
||||||
VERSION_4,
|
VERSION_4,
|
||||||
VERSION_6,
|
VERSION_6,
|
||||||
VERSION_UNKNOWN,
|
VERSION_UNKNOWN
|
||||||
};
|
};
|
||||||
/*! \enum prefix_t
|
/*! \enum prefix_t
|
||||||
* \brief Enumeration of interesting data in dhcpd.leases file, that has
|
* \brief Enumeration of interesting data in dhcpd.leases file, that has
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,6 @@ struct leases_t *find_lease(union ipaddr_t *addr)
|
||||||
* \param lease Pointer to lease hash. */
|
* \param lease Pointer to lease hash. */
|
||||||
void delete_lease(struct leases_t *lease)
|
void delete_lease(struct leases_t *lease)
|
||||||
{
|
{
|
||||||
if (lease->ethernet != NULL)
|
|
||||||
free(lease->ethernet);
|
free(lease->ethernet);
|
||||||
HASH_DEL(leases, lease);
|
HASH_DEL(leases, lease);
|
||||||
free(lease);
|
free(lease);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue