summaryrefslogtreecommitdiff
path: root/contrib/smbfs/lib/smb/nb_name.c
diff options
context:
space:
mode:
authorSheldon Hearn <sheldonh@FreeBSD.org>2001-12-20 16:16:25 +0000
committerSheldon Hearn <sheldonh@FreeBSD.org>2001-12-20 16:16:25 +0000
commitdf3342d686a25c2ac043aab1f024ef5f96b52f27 (patch)
tree047ddfc533f4ae21ddcdd454a87abe41ff403b0d /contrib/smbfs/lib/smb/nb_name.c
parentf1b9d12761de3c33754f03e6d2a5bf9f1b40aad9 (diff)
Notes
Diffstat (limited to 'contrib/smbfs/lib/smb/nb_name.c')
-rw-r--r--contrib/smbfs/lib/smb/nb_name.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/smbfs/lib/smb/nb_name.c b/contrib/smbfs/lib/smb/nb_name.c
index 24b1a80cf9df0..01500c313a41c 100644
--- a/contrib/smbfs/lib/smb/nb_name.c
+++ b/contrib/smbfs/lib/smb/nb_name.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, Boris Popov
+ * Copyright (c) 2000-2001, Boris Popov
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -29,10 +29,11 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: nb_name.c,v 1.1 2000/07/16 01:52:07 bp Exp $
+ * $Id: nb_name.c,v 1.2 2001/08/22 03:31:36 bp Exp $
*/
#include <sys/param.h>
#include <sys/socket.h>
+#include <sys/mchain.h> /* for endiand macros */
#include <ctype.h>
#include <err.h>
@@ -138,8 +139,8 @@ nb_encname_len(const char *str)
return len;
}
-#define NBENCODE(c) ((u_short)(((u_char)(c) >> 4) | \
- (((u_char)(c) & 0xf) << 8)) + 0x4141)
+#define NBENCODE(c) (htoles((u_short)(((u_char)(c) >> 4) | \
+ (((u_char)(c) & 0xf) << 8)) + 0x4141))
static void
memsetw(char *dst, int n, u_short word)