Mercurial > gftp.yaz
diff lib/sshv2.c @ 747:c8e09269c3e1
2006-5-14 Brian Masney <masneyb@gftp.org>
* lib/sshv2.c - make sure the 64 bit data is transformed into network
byte order (from Aurelien Jarno <aurelien@aurel32.net>) (closes #168466)
author | masneyb |
---|---|
date | Mon, 15 May 2006 01:31:20 +0000 |
parents | 1b28a63d125a |
children | d553d14a2565 |
line wrap: on
line diff
--- a/lib/sshv2.c Sun May 14 17:26:56 2006 +0000 +++ b/lib/sshv2.c Mon May 15 01:31:20 2006 +0000 @@ -1867,31 +1867,13 @@ } -#ifdef G_HAVE_GINT64 - -static gint64 -sshv2_hton64 (gint64 val) -{ -#if G_BYTE_ORDER != G_BIG_ENDIAN - return (GINT64_TO_BE (val)); -#else - return (val); -#endif -} - -#endif - - static void sshv2_setup_file_offset (sshv2_params * params, char *buf) { guint32 hinum, lownum; #ifdef G_HAVE_GINT64 - gint64 offset; - - offset = sshv2_hton64 (params->offset); - lownum = offset >> 32; - hinum = (guint32) offset; + hinum = htonl(params->offset >> 32); + lownum = htonl((guint32) params->offset); #else hinum = 0; lownum = htonl (params->offset);