Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Jul 15, 2015
1 parent 582ef50 commit e557287
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions src/lib/pcap.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
* @param pcap to free.
* @return 0
*/
static int _free_pcap(fr_pcap_t *pcap) {
static int _free_pcap(fr_pcap_t *pcap)
{
switch (pcap->type) {
case PCAP_INTERFACE_IN:
case PCAP_INTERFACE_OUT:
Expand Down Expand Up @@ -116,9 +117,7 @@ fr_pcap_t *fr_pcap_init(TALLOC_CTX *ctx, char const *name, fr_pcap_type_t type)
}

this = talloc_zero(ctx, fr_pcap_t);
if (!this) {
return NULL;
}
if (!this) return NULL;

talloc_set_destructor(this, _free_pcap);
this->name = talloc_typed_strdup(this, name);
Expand Down
6 changes: 3 additions & 3 deletions src/modules/proto_dhcp/dhcpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,10 +609,10 @@ static int dhcp_process(REQUEST *request)
* @param this listen section
* @return PCAP filter string
*/
static const char * dhcp_pcap_filter_builder(rad_listen_t *this)
static const char *dhcp_pcap_filter_build(rad_listen_t *this)
{
dhcp_socket_t *sock = this->data;
char * buf;
char *buf;
char ip[16];
ip_ntoh(&sock->lsock.my_ipaddr, ip, sizeof(ip));

Expand All @@ -632,7 +632,7 @@ static int dhcp_socket_parse(CONF_SECTION *cs, rad_listen_t *this)
CONF_PAIR *cp;

#ifndef SO_BINDTODEVICE
sock->lsock.pcap_filter_builder = dhcp_pcap_filter_builder;
sock->lsock.pcap_filter_builder = dhcp_pcap_filter_build;
sock->lsock.pcap_type = PCAP_INTERFACE_IN_OUT;
#endif

Expand Down

0 comments on commit e557287

Please sign in to comment.