summaryrefslogtreecommitdiffhomepage
path: root/svr-x11fwd.c
diff options
context:
space:
mode:
authorChocobo1 <Chocobo1@users.noreply.github.com>2016-01-05 12:32:33 +0800
committerChocobo1 <Chocobo1@users.noreply.github.com>2016-01-05 12:37:48 +0800
commit9bcd5f3c0aac51af390b77d725c124e42baa60cd (patch)
treea73fb0457dbe6a90ba622e0791adf0938ee367ea /svr-x11fwd.c
parent533aebe33656f0ade5f9071ae7880b54a097752b (diff)
Fix print format specifier
Diffstat (limited to 'svr-x11fwd.c')
-rw-r--r--svr-x11fwd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/svr-x11fwd.c b/svr-x11fwd.c
index 144ec0b..9e7df24 100644
--- a/svr-x11fwd.c
+++ b/svr-x11fwd.c
@@ -142,7 +142,7 @@ void x11setauth(struct ChanSess *chansess) {
}
/* create the DISPLAY string */
- val = snprintf(display, sizeof(display), "localhost:%d.%d",
+ val = snprintf(display, sizeof(display), "localhost:%d.%u",
chansess->x11port - X11BASEPORT, chansess->x11screennum);
if (val < 0 || val >= (int)sizeof(display)) {
/* string was truncated */
@@ -152,7 +152,7 @@ void x11setauth(struct ChanSess *chansess) {
addnewvar("DISPLAY", display);
/* create the xauth string */
- val = snprintf(display, sizeof(display), "unix:%d.%d",
+ val = snprintf(display, sizeof(display), "unix:%d.%u",
chansess->x11port - X11BASEPORT, chansess->x11screennum);
if (val < 0 || val >= (int)sizeof(display)) {
/* string was truncated */