fio: Eliminate compilation warning in ppc
[fio.git] / server.c
index f65f3abfc87339211c72302e0ed7f36243382ed9..8865502520cb7f1fe2a8315bf8c9c79c54e346a7 100644 (file)
--- a/server.c
+++ b/server.c
@@ -555,6 +555,7 @@ static int handle_run_cmd(struct flist_head *job_list, struct fio_net_cmd *cmd)
        pid_t pid;
        int ret;
 
+       fio_time_init();
        set_genesis_time();
 
        pid = fork();
@@ -1225,7 +1226,9 @@ int fio_send_iolog(struct thread_data *td, struct io_log *log, const char *name)
        pdu.nr_samples = __cpu_to_le32(log->nr_samples);
        pdu.log_type = cpu_to_le32(log->log_type);
        pdu.compressed = cpu_to_le32(use_zlib);
-       strcpy((char *) pdu.name, name);
+
+       strncpy((char *) pdu.name, name, FIO_NET_NAME_MAX);
+       pdu.name[FIO_NET_NAME_MAX - 1] = '\0';
 
        for (i = 0; i < log->nr_samples; i++) {
                struct io_sample *s = &log->log[i];