diff options
| author | Richard Nyberg <rnyberg@murmeldjur.se> | 2009-01-12 23:53:16 +0100 |
|---|---|---|
| committer | Richard Nyberg <rnyberg@murmeldjur.se> | 2009-01-12 23:54:18 +0100 |
| commit | ba9895e7a55ae97db739c4568a9cad169299c02f (patch) | |
| tree | 6875c952d463ddacf35494aac47053a4cb1eb214 | |
| parent | 5a6ac5189fc438e359ecf0bebaedd70c1af03fdd (diff) | |
| download | btpd-ba9895e7a55ae97db739c4568a9cad169299c02f.tar.gz btpd-ba9895e7a55ae97db739c4568a9cad169299c02f.zip | |
Test for working snprintf at startup.
| -rw-r--r-- | btpd/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/btpd/main.c b/btpd/main.c index 089929d..74f071e 100644 --- a/btpd/main.c +++ b/btpd/main.c @@ -32,6 +32,9 @@ setup_daemon(int daemonize, const char *dir) pid_t pid; struct timespec ts; + if (snprintf(NULL, 0, "btpd") != 4) + btpd_err("snprintf doesn't work.\n"); + if (clock_gettime(CLOCK_MONOTONIC, &ts) != 0) btpd_err("clock_gettime(CLOCK_MONOTONIC, ...) failed (%s).\n", strerror(errno)); |