Skip to content

Commit 8277ec9

Browse files
committed
scsi.c: use printaddr
* scsi.c (print_sg_io_buffer): Use printaddr.
1 parent 1252d26 commit 8277ec9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scsi.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ print_sg_io_buffer(struct tcb *tcp, unsigned long addr, const unsigned int len)
5252
if (len == 0)
5353
goto out;
5454
allocated = (len > max_strlen) ? max_strlen : len;
55-
if ((buf = malloc(allocated)) == NULL ||
56-
umoven(tcp, addr, allocated, buf) < 0) {
57-
tprintf("%#lx", addr);
55+
buf = malloc(allocated);
56+
if (!buf || umoven(tcp, addr, allocated, buf) < 0) {
57+
printaddr(addr);
5858
goto out;
5959
}
6060
tprintf("%02x", buf[0]);

0 commit comments

Comments
 (0)