X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7721f9d25945759e012f67181e69550a3a222eb0..e12ed890997653ca19117ffafad569e7f6c23182:/buildtools/Cmake/test_prog/prog_snprintf.c diff --git a/buildtools/Cmake/test_prog/prog_snprintf.c b/buildtools/Cmake/test_prog/prog_snprintf.c index a33c8467fb..60f24037b3 100644 --- a/buildtools/Cmake/test_prog/prog_snprintf.c +++ b/buildtools/Cmake/test_prog/prog_snprintf.c @@ -8,14 +8,18 @@ int main(void) { - char bufs[5] = { 'x', 'x', 'x', '\0', '\0' }; - char bufd[5] = { 'x', 'x', 'x', '\0', '\0' }; - int i; - i = snprintf (bufs, 2, "%s", "111"); - if (strcmp (bufs, "1")) exit (1); - if (i != 3) exit (1); - i = snprintf (bufd, 2, "%d", 111); - if (strcmp (bufd, "1")) exit (1); - if (i != 3) exit (1); - exit(0); + char bufs[5] = { 'x', 'x', 'x', '\0', '\0' }; + char bufd[5] = { 'x', 'x', 'x', '\0', '\0' }; + int i; + i = snprintf(bufs, 2, "%s", "111"); + if (strcmp(bufs, "1")) + exit(1); + if (i != 3) + exit(1); + i = snprintf(bufd, 2, "%d", 111); + if (strcmp(bufd, "1")) + exit(1); + if (i != 3) + exit(1); + exit(0); }