summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/sd-lldp.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-12-19 22:42:03 +0100
committerTom Gundersen <teg@jklm.no>2014-12-19 22:42:03 +0100
commit7a6f1457462840ed52f2a332e2bd56ca210cff2d (patch)
tree6b5edb9a071082233c0ed042e2a6f44cdd07d96c /src/libsystemd-network/sd-lldp.c
parent2cd3aa24820e5d82375c8cc3e4446d884ee4fee0 (diff)
sd-lldp: minor header cleanup
* (potentially) public headers must reside in src/systemd/ (not in src/libsystemd*) * some private (not prefixed with sd_) functions moved from sd-lldp.h to lldp-internal.h * introduce lldp-util.h for the cleanup macro, as these should not be public * rename the cleanup macro, we always name them _cleanup_foo_, never _cleanup_sd_foo_ * mark some function arguments as 'const'
Diffstat (limited to 'src/libsystemd-network/sd-lldp.c')
-rw-r--r--src/libsystemd-network/sd-lldp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libsystemd-network/sd-lldp.c b/src/libsystemd-network/sd-lldp.c
index 45881e5f64..08cd092213 100644
--- a/src/libsystemd-network/sd-lldp.c
+++ b/src/libsystemd-network/sd-lldp.c
@@ -32,6 +32,7 @@
#include "prioq.h"
#include "strv.h"
#include "lldp-internal.h"
+#include "lldp-util.h"
#include "ether-addr-util.h"
typedef enum LLDPAgentRXState {
@@ -668,10 +669,10 @@ void sd_lldp_free(sd_lldp *lldp) {
}
int sd_lldp_new(int ifindex,
- char *ifname,
- struct ether_addr *mac,
+ const char *ifname,
+ const struct ether_addr *mac,
sd_lldp **ret) {
- _cleanup_sd_lldp_free_ sd_lldp *lldp = NULL;
+ _cleanup_lldp_free_ sd_lldp *lldp = NULL;
int r;
assert_return(ret, -EINVAL);