summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-03-21 05:07:10 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-03-21 05:07:10 +0100
commit4f7bd1e439847d1db35b0bfd28372bbd98830477 (patch)
tree47196b9a00db484733e29eb9d8e9d85e6c3ae6dd
parent2d369f16e420f01f0fc5cbc168ccc662d3328a43 (diff)
downloadbabel-4f7bd1e439847d1db35b0bfd28372bbd98830477.tar
babel-4f7bd1e439847d1db35b0bfd28372bbd98830477.zip
Rename alloca_packet() to gp_babel_packet_alloca()
-rw-r--r--src/packet.h2
-rw-r--r--src/send.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/packet.h b/src/packet.h
index 07c0f3b..df22dd6 100644
--- a/src/packet.h
+++ b/src/packet.h
@@ -43,7 +43,7 @@ struct __attribute__((packed)) gp_babel_packet {
uint8_t tlv[];
};
-#define alloca_packet(size) ({ \
+#define gp_babel_packet_alloca(size) ({ \
gp_babel_packet_t *__packet = alloca(sizeof(gp_babel_packet_t)+size); \
__packet->version = htons(GP_BABEL_VERSION); \
__packet->len = 0; \
diff --git a/src/send.c b/src/send.c
index fd3f9d7..cdeb07a 100644
--- a/src/send.c
+++ b/src/send.c
@@ -44,7 +44,7 @@ static inline bool send_neigh(gmrf_t *gmrf, const gp_babel_neigh_t *neigh, const
}
void gp_babel_send_ack(gmrf_t *gmrf, gmrf_context_t *ctx, gp_babel_neigh_t *neigh, uint16_t nonce) {
- gp_babel_packet_t *packet = alloca_packet(GP_BABEL_PACKET_MAX);
+ gp_babel_packet_t *packet = gp_babel_packet_alloca(GP_BABEL_PACKET_MAX);
gp_babel_tlv_ack_t *ack = gp_babel_tlv_add(packet, GP_BABEL_PACKET_MAX, TLV_ACK, sizeof(gp_babel_tlv_ack_t));
if (!ack)
@@ -74,7 +74,7 @@ static void add_ihus(gmrf_t *gmrf, gp_babel_packet_t *packet, size_t max_len, co
void gp_babel_send_hellos(gmrf_t *gmrf, gmrf_context_t *ctx) {
gmrf_logf(gmrf, LOG_DEBUG, "sending hellos...");
- gp_babel_packet_t *packet = alloca_packet(GP_BABEL_PACKET_MAX);
+ gp_babel_packet_t *packet = gp_babel_packet_alloca(GP_BABEL_PACKET_MAX);
gp_babel_tlv_hello_t *hello = gp_babel_tlv_add(packet, GP_BABEL_PACKET_MAX, TLV_HELLO, sizeof(gp_babel_tlv_hello_t));
if (!hello)