More iolog fixes

- Warn if nrfiles > 1, so that the user knows it's not supported
- Need to clear ipo on malloc, or ->file could be some random value.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/log.c b/log.c
index de3b759..9669b4a 100644
--- a/log.c
+++ b/log.c
@@ -140,6 +140,7 @@
 		}
 
 		ipo = malloc(sizeof(*ipo));
+		memset(ipo, 0, sizeof(*ipo));
 		INIT_LIST_HEAD(&ipo->list);
 		ipo->offset = offset;
 		ipo->len = bytes;
@@ -171,6 +172,11 @@
 {
 	FILE *f;
 
+	if (td->o.nr_files > 1) {
+		log_err("fio: write_iolog only works with 1 file currently\n");
+		return 1;
+	}
+
 	f = fopen(td->o.write_iolog_file, "w+");
 	if (!f) {
 		perror("fopen write iolog");