summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-11-29 05:20:23 +0000
committerAndrew Tridgell <tridge@samba.org>2001-11-29 05:20:23 +0000
commit5bfc7214afb23984acc7aba9fd7a57eec7c18d6d (patch)
tree357001e06c87d160a04025cf1220ea7920f9c174 /source3/lib
parentfbcf770865d8c5273423bb45ab0ebc73dc449dbc (diff)
downloadsamba-5bfc7214afb23984acc7aba9fd7a57eec7c18d6d.tar.gz
samba-5bfc7214afb23984acc7aba9fd7a57eec7c18d6d.tar.bz2
samba-5bfc7214afb23984acc7aba9fd7a57eec7c18d6d.zip
fixed toupper_w() and friends on big-endian
this fixes the core dumps on sparc (This used to be commit e6004062a508b1fe6dd7f93d8a933da9916598f8)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util_unistr.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/lib/util_unistr.c b/source3/lib/util_unistr.c
index 44e792a9fd..48f21782b3 100644
--- a/source3/lib/util_unistr.c
+++ b/source3/lib/util_unistr.c
@@ -67,7 +67,7 @@ void load_case_tables(void)
const char *allowed = "!#$%&'()_-@^`~";
DEBUG(1,("creating lame valid table\n"));
valid_table = malloc(0x10000);
- for (0;i<0x10000;i++) valid_table[i] = 0;
+ for (i=0;i<0x10000;i++) valid_table[i] = 0;
for (i=0;i<256;i++) valid_table[UCS2_CHAR(i)] = isalnum(i) || strchr(allowed,i);
}
}
@@ -182,7 +182,7 @@ uint32 buffer2_to_uint32(BUFFER2 *str)
smb_ucs2_t toupper_w(smb_ucs2_t val)
{
- return upcase_table[SVAL(&val,0)];
+ return upcase_table[val];
}
/*******************************************************************
@@ -191,7 +191,7 @@ smb_ucs2_t toupper_w(smb_ucs2_t val)
smb_ucs2_t tolower_w( smb_ucs2_t val )
{
- return lowcase_table[SVAL(&val,0)];
+ return lowcase_table[val];
}
/*******************************************************************
@@ -199,7 +199,7 @@ determine if a character is lowercase
********************************************************************/
BOOL islower_w(smb_ucs2_t c)
{
- return upcase_table[SVAL(&c,0)] != c;
+ return upcase_table[c] != c;
}
/*******************************************************************
@@ -207,7 +207,7 @@ determine if a character is uppercase
********************************************************************/
BOOL isupper_w(smb_ucs2_t c)
{
- return lowcase_table[SVAL(&c,0)] != c;
+ return lowcase_table[c] != c;
}
@@ -216,7 +216,7 @@ determine if a character is valid in a 8.3 name
********************************************************************/
BOOL isvalid83_w(smb_ucs2_t c)
{
- return valid_table[SVAL(&c,0)] != 0;
+ return valid_table[c] != 0;
}
/*******************************************************************