summaryrefslogtreecommitdiff
path: root/src/libunixonacid
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2014-12-05 18:04:58 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2014-12-05 18:04:58 +0000
commit5d6810d9eb833f923f1543fbb369823f7cd289df (patch)
treea4c1a2a79caa90e9a3397f17bedee9c617b0c92b /src/libunixonacid
parent89cd43338a2a9bb768d715f1bb53987801be7c79 (diff)
downloadskalibs-5d6810d9eb833f923f1543fbb369823f7cd289df.tar.xz
It's possible to statically initialize unixmessage_receiver_0
Diffstat (limited to 'src/libunixonacid')
-rw-r--r--src/libunixonacid/skaclient_server_01x.c21
-rw-r--r--src/libunixonacid/unixmessage_receiver_0.c7
2 files changed, 1 insertions, 27 deletions
diff --git a/src/libunixonacid/skaclient_server_01x.c b/src/libunixonacid/skaclient_server_01x.c
deleted file mode 100644
index e55e8cd..0000000
--- a/src/libunixonacid/skaclient_server_01x.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/* ISC license. */
-
-/* MT-unsafe */
-
-#include <skalibs/tai.h>
-#include <skalibs/unixmessage.h>
-#include <skalibs/skaclient.h>
-
-int skaclient_server_01x_init (char const *before, unsigned int beforelen, char const *after, unsigned int afterlen, tain_t const *deadline, tain_t *stamp)
-{
- return unixmessage_receiver_0_init() && skaclient_server_init(
- unixmessage_receiver_0,
- unixmessage_sender_1,
- unixmessage_sender_x,
- before,
- beforelen,
- after,
- afterlen,
- deadline,
- stamp) ;
-}
diff --git a/src/libunixonacid/unixmessage_receiver_0.c b/src/libunixonacid/unixmessage_receiver_0.c
index b43bdfb..6d48daa 100644
--- a/src/libunixonacid/unixmessage_receiver_0.c
+++ b/src/libunixonacid/unixmessage_receiver_0.c
@@ -7,9 +7,4 @@
static char mainbuf[UNIXMESSAGE_BUFSIZE] ;
static char auxbuf[UNIXMESSAGE_AUXBUFSIZE] ;
-unixmessage_receiver_t unixmessage_receiver_0_ = UNIXMESSAGE_RECEIVER_ZERO ;
-
-int unixmessage_receiver_0_init ()
-{
- return unixmessage_receiver_init(&unixmessage_receiver_0_, 0, mainbuf, UNIXMESSAGE_BUFSIZE, auxbuf, UNIXMESSAGE_AUXBUFSIZE) ;
-}
+UNIXMESSAGE_RECEIVER_DECLARE_AND_INIT(unixmessage_receiver_0_, 0, mainbuf, UNIXMESSAGE_BUFSIZE, auxbuf, UNIXMESSAGE_AUXBUFSIZE) ;