aboutsummaryrefslogtreecommitdiff
path: root/examples/senddata.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2010-10-27 22:53:20 +0200
committerAris Adamantiadis <aris@0xbadc0de.be>2010-10-27 22:53:20 +0200
commitb6901ec4b972e7edc6df6c7eb2414c9d0a51f114 (patch)
tree229f025d22b5de0f47281f03eac2e97c7a0a949e /examples/senddata.c
parentea4aa26dbb090dfbf87484854deb1d6dbf5cf813 (diff)
downloadlibssh-b6901ec4b972e7edc6df6c7eb2414c9d0a51f114.tar.gz
libssh-b6901ec4b972e7edc6df6c7eb2414c9d0a51f114.tar.xz
libssh-b6901ec4b972e7edc6df6c7eb2414c9d0a51f114.zip
Fix senddata.c for 32bits machines
Diffstat (limited to 'examples/senddata.c')
-rw-r--r--examples/senddata.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/senddata.c b/examples/senddata.c
index bd8d117..c8895ad 100644
--- a/examples/senddata.c
+++ b/examples/senddata.c
@@ -10,8 +10,8 @@ int main(void) {
ssh_channel channel;
char buffer[1024*1024];
int rc;
- long total=0;
- long lastshown=4096;
+ uint64_t total=0;
+ uint64_t lastshown=4096;
session = connect_ssh("localhost", NULL, 0);
if (session == NULL) {
return 1;
@@ -41,7 +41,7 @@ int main(void) {
while ((rc = ssh_channel_write(channel, buffer, sizeof(buffer))) > 0) {
total += rc;
if(total/2 >= lastshown){
- printf("written %lx\n",total);
+ printf("written %llx\n",total);
lastshown=total;
}
if(total > LIMIT)