diff --git a/ChangeLog b/ChangeLog index 2d5a228ee4e04bc152e30d1da7dc1a4ed5469d41..684ef4f23b0b88f8f2314b93e5c49fe1ccf68bd9 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 604e410ffa2dc7dcf63be7b736348840c98b5e80..9c8e3a695868201039a97b5d9c8483024a6e97cf 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);