~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/password.c

  • Committer: Brian Aker
  • Date: 2008-09-16 09:41:23 UTC
  • Revision ID: brian@gir.lan-20080916094123-2ws792vn896n2g53
Fixed uint/ushort issue in libdrizzle

Show diffs side-by-side

added added

removed removed

Lines of Context:
135
135
 
136
136
static inline uint8_t char_val(uint8_t X)
137
137
{
138
 
  return (uint) (X >= '0' && X <= '9' ? X-'0' :
 
138
  return (uint32_t) (X >= '0' && X <= '9' ? X-'0' :
139
139
      X >= 'A' && X <= 'Z' ? X-'A'+10 : X-'a'+10);
140
140
}
141
141
 
154
154
    rand_st  INOUT structure used for number generation
155
155
*/
156
156
 
157
 
void create_random_string(char *to, uint length, struct rand_struct *rand_st)
 
157
void create_random_string(char *to, uint32_t length, struct rand_struct *rand_st)
158
158
{
159
159
  char *end= to + length;
160
160
  /* Use pointer arithmetics as it is faster way to do so. */
181
181
    buf+len*2
182
182
*/
183
183
 
184
 
char *octet2hex(char *to, const char *str, uint len)
 
184
char *octet2hex(char *to, const char *str, uint32_t len)
185
185
{
186
186
  const char *str_end= str + len; 
187
187
  for (; str != str_end; ++str)