瀏覽代碼

Test for working snprintf at startup.

master
Richard Nyberg 16 年之前
父節點
當前提交
ba9895e7a5
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. +3
    -0
      btpd/main.c

+ 3
- 0
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));


Loading…
取消
儲存