summaryrefslogtreecommitdiff
path: root/tests/test_gethostname_static.c
blob: 9b8f8e179ec3e70667fd7b4220c323e770544a41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "common.h"

#include <unistd.h>

int main(int argc, char** argv) {
  char buffer[12] = {0};

  gethostname(buffer, 10);

  CHK_FAIL_START
  gethostname(buffer, 14);
  CHK_FAIL_END

  puts(buffer);
  return ret;
}