aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2009-12-23 15:45:30 +0000
committerBlue Swirl <blauwirbel@gmail.com>2009-12-23 15:45:30 +0000
commit22ff51ee64b2d7ab2ef16d34742d1d8920bfe209 (patch)
tree0b7d13f779ac0f1e440b60f32991bd6eecc53727 /qemu-nbd.c
parente1000: add link to data sheet (diff)
downloadqemu-kvm-22ff51ee64b2d7ab2ef16d34742d1d8920bfe209.tar.gz
qemu-kvm-22ff51ee64b2d7ab2ef16d34742d1d8920bfe209.tar.bz2
qemu-kvm-22ff51ee64b2d7ab2ef16d34742d1d8920bfe209.zip
qemu-nbd: fix OpenBSD linker warning
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'qemu-nbd.c')
-rw-r--r--qemu-nbd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/qemu-nbd.c b/qemu-nbd.c
index 91ea01414..6707ea5ca 100644
--- a/qemu-nbd.c
+++ b/qemu-nbd.c
@@ -353,7 +353,8 @@ int main(int argc, char **argv)
}
if (socket == NULL) {
- sprintf(sockpath, SOCKET_PATH, basename(device));
+ snprintf(sockpath, sizeof(sockpath), SOCKET_PATH,
+ basename(device));
socket = sockpath;
}