Skip to content

Commit 5d7b210

Browse files
committed
ioctl: Set provided timestamp nvme_set_features_timestamp
The argument order for memcpy is clearly the wrong way around. The provided timestamp should be stored into the ts variable. The compiler was warning about ts not being initialized. Signed-off-by: Daniel Wagner <[email protected]>
1 parent 5c204b1 commit 5d7b210

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/nvme/ioctl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ int nvme_set_features_timestamp(int fd, bool save, __u64 timestamp)
589589
.result = NULL,
590590
};
591591

592-
memcpy(&t, ts.timestamp, sizeof(ts.timestamp));
592+
memcpy(ts.timestamp, &t, sizeof(ts.timestamp));
593593
return nvme_set_features(&args);
594594
}
595595

0 commit comments

Comments
 (0)