From: Jim Meyering Date: Mon, 12 Nov 2007 22:16:25 +0000 (+0000) Subject: conftest: fix transposed size and count arguments to fwrite. X-Git-Tag: LIBVIRT_0_4_1~289 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a8b9c6640a1a910cd53bfd076d823cd3b367e5b6;p=thirdparty%2Flibvirt.git conftest: fix transposed size and count arguments to fwrite. * tests/conftest.c: Include and . Also include strerror in diagnostic. Author: Jim Meyering --- diff --git a/ChangeLog b/ChangeLog index 2d5a228ee4..684ef4f23b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Mon Nov 12 23:11:35 CET 2007 Jim Meyering + + conftest: fix transposed size and count arguments to fwrite. + * tests/conftest.c: Include and . + Also include strerror in diagnostic. + Mon Nov 12 14:56:33 CET 2007 Daniel Veillard Begin fixing uses of strtol: parse integers more carefully. diff --git a/tests/conftest.c b/tests/conftest.c index 604e410ffa..9c8e3a6958 100644 --- a/tests/conftest.c +++ b/tests/conftest.c @@ -1,6 +1,8 @@ #include #include #include +#include +#include #include "conf.h" int main(int argc, char **argv) { @@ -25,8 +27,8 @@ int main(int argc, char **argv) { exit(3); } virConfFree(conf); - if (fwrite(buffer, len, 1, stdout) != len) { - fprintf(stderr, "Write failed\n"); + if (fwrite(buffer, 1, len, stdout) != len) { + fprintf(stderr, "Write failed: %s\n", strerror (errno)); exit(1); } exit(0);