Browse code

Sun CC fixes.

Jan Janak authored on 12/03/2003 12:48:11
Showing 4 changed files
... ...
@@ -99,10 +99,10 @@ static inline int hex2integer(char* _s)
99 99
  * Nonce value consists of time in seconds since 1.1 1970 and
100 100
  * secret phrase
101 101
  */
102
-inline void calc_nonce(char* _nonce, int _expires, str* _secret)
102
+void calc_nonce(char* _nonce, int _expires, str* _secret)
103 103
 {
104 104
 	MD5_CTX ctx;
105
-	char bin[16];
105
+	unsigned char bin[16];
106 106
 
107 107
 	MD5Init(&ctx);
108 108
 	
... ...
@@ -119,7 +119,7 @@ inline void calc_nonce(char* _nonce, int _expires, str* _secret)
119 119
 /*
120 120
  * Get expiry time from nonce string
121 121
  */
122
-inline time_t get_nonce_expires(str* _n)
122
+time_t get_nonce_expires(str* _n)
123 123
 {
124 124
 	return (time_t)hex2integer(_n->s);
125 125
 }
... ...
@@ -48,13 +48,17 @@
48 48
 
49 49
 static inline int get_ha1(str* _user, str* _domain, str* _realm, char* _table, char* _ha1)
50 50
 {
51
-	db_key_t keys[] = {username_column, domain_column};
51
+	db_key_t keys[2];
52 52
 	db_val_t vals[2];
53
-	db_key_t col[] = {pass_column};
53
+	db_key_t col[1];
54 54
 	db_res_t* res;
55 55
 	str result;
56 56
 	char* at;
57 57
 
58
+	keys[0] = username_column;
59
+	keys[1] = domain_column;
60
+	col[0] = pass_column;	
61
+
58 62
 	VAL_TYPE(vals) = VAL_TYPE(vals + 1) = DB_STR;
59 63
 	VAL_NULL(vals) = VAL_NULL(vals + 1) = 0;
60 64
 	
... ...
@@ -64,8 +64,11 @@ int process_del_list(str* _d)
64 64
 {
65 65
 	struct del_itm* p;
66 66
 	char b[256];
67
-	db_key_t keys[2] = {user_col, contact_col};
67
+	db_key_t keys[2];
68 68
 	db_val_t vals[2];
69
+
70
+	keys[0] = user_col;
71
+	keys[1] = contact_col;
69 72
 	
70 73
 	if (del_root) {
71 74
 	     /* FIXME */
... ...
@@ -38,7 +38,7 @@ struct del_itm {
38 38
 	struct del_itm* next;
39 39
 	int user_len;
40 40
 	int cont_len;
41
-	char tail[0];
41
+	char tail[1];
42 42
 };
43 43
 
44 44