diff options
author | jsing <> | 2016-12-30 15:12:45 +0000 |
---|---|---|
committer | jsing <> | 2016-12-30 15:12:45 +0000 |
commit | 88ff2e52fac94c4fe54e003e48b26cf5f092fa8f (patch) | |
tree | 181f33295cd92939a2f40fbac5ffd3867b7415c1 | |
parent | 3dafaaa6898a7483168a8940c80b6bb2050262a3 (diff) | |
download | openbsd-88ff2e52fac94c4fe54e003e48b26cf5f092fa8f.tar.gz openbsd-88ff2e52fac94c4fe54e003e48b26cf5f092fa8f.tar.bz2 openbsd-88ff2e52fac94c4fe54e003e48b26cf5f092fa8f.zip |
Remove now unused c2l, c2ln, l2c, n2l, l2cn and n2l3 macros.
-rw-r--r-- | src/lib/libssl/s3_both.c | 3 | ||||
-rw-r--r-- | src/lib/libssl/ssl_locl.h | 52 |
2 files changed, 2 insertions, 53 deletions
diff --git a/src/lib/libssl/s3_both.c b/src/lib/libssl/s3_both.c index 52af34a809..51429d907a 100644 --- a/src/lib/libssl/s3_both.c +++ b/src/lib/libssl/s3_both.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: s3_both.c,v 1.49 2016/12/06 13:17:52 jsing Exp $ */ | 1 | /* $OpenBSD: s3_both.c,v 1.50 2016/12/30 15:12:45 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -478,7 +478,6 @@ ssl3_get_message(SSL *s, int st1, int stn, int mt, long max, int *ok) | |||
478 | goto f_err; | 478 | goto f_err; |
479 | } | 479 | } |
480 | 480 | ||
481 | /* XXX remove call to n2l3 */ | ||
482 | CBS_init(&cbs, p, 4); | 481 | CBS_init(&cbs, p, 4); |
483 | if (!CBS_get_u8(&cbs, &u8) || | 482 | if (!CBS_get_u8(&cbs, &u8) || |
484 | !CBS_get_u24(&cbs, &l)) { | 483 | !CBS_get_u24(&cbs, &l)) { |
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h index 858be71627..de977846a4 100644 --- a/src/lib/libssl/ssl_locl.h +++ b/src/lib/libssl/ssl_locl.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_locl.h,v 1.141 2016/12/21 16:44:31 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_locl.h,v 1.142 2016/12/30 15:12:45 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -164,37 +164,6 @@ | |||
164 | 164 | ||
165 | __BEGIN_HIDDEN_DECLS | 165 | __BEGIN_HIDDEN_DECLS |
166 | 166 | ||
167 | #define c2l(c,l) (l = ((unsigned long)(*((c)++))) , \ | ||
168 | l|=(((unsigned long)(*((c)++)))<< 8), \ | ||
169 | l|=(((unsigned long)(*((c)++)))<<16), \ | ||
170 | l|=(((unsigned long)(*((c)++)))<<24)) | ||
171 | |||
172 | /* NOTE - c is not incremented as per c2l */ | ||
173 | #define c2ln(c,l1,l2,n) { \ | ||
174 | c+=n; \ | ||
175 | l1=l2=0; \ | ||
176 | switch (n) { \ | ||
177 | case 8: l2 =((unsigned long)(*(--(c))))<<24; \ | ||
178 | case 7: l2|=((unsigned long)(*(--(c))))<<16; \ | ||
179 | case 6: l2|=((unsigned long)(*(--(c))))<< 8; \ | ||
180 | case 5: l2|=((unsigned long)(*(--(c)))); \ | ||
181 | case 4: l1 =((unsigned long)(*(--(c))))<<24; \ | ||
182 | case 3: l1|=((unsigned long)(*(--(c))))<<16; \ | ||
183 | case 2: l1|=((unsigned long)(*(--(c))))<< 8; \ | ||
184 | case 1: l1|=((unsigned long)(*(--(c)))); \ | ||
185 | } \ | ||
186 | } | ||
187 | |||
188 | #define l2c(l,c) (*((c)++)=(unsigned char)(((l) )&0xff), \ | ||
189 | *((c)++)=(unsigned char)(((l)>> 8)&0xff), \ | ||
190 | *((c)++)=(unsigned char)(((l)>>16)&0xff), \ | ||
191 | *((c)++)=(unsigned char)(((l)>>24)&0xff)) | ||
192 | |||
193 | #define n2l(c,l) (l =((unsigned long)(*((c)++)))<<24, \ | ||
194 | l|=((unsigned long)(*((c)++)))<<16, \ | ||
195 | l|=((unsigned long)(*((c)++)))<< 8, \ | ||
196 | l|=((unsigned long)(*((c)++)))) | ||
197 | |||
198 | #define l2n(l,c) (*((c)++)=(unsigned char)(((l)>>24)&0xff), \ | 167 | #define l2n(l,c) (*((c)++)=(unsigned char)(((l)>>24)&0xff), \ |
199 | *((c)++)=(unsigned char)(((l)>>16)&0xff), \ | 168 | *((c)++)=(unsigned char)(((l)>>16)&0xff), \ |
200 | *((c)++)=(unsigned char)(((l)>> 8)&0xff), \ | 169 | *((c)++)=(unsigned char)(((l)>> 8)&0xff), \ |
@@ -209,30 +178,11 @@ __BEGIN_HIDDEN_DECLS | |||
209 | *((c)++)=(unsigned char)(((l)>> 8)&0xff), \ | 178 | *((c)++)=(unsigned char)(((l)>> 8)&0xff), \ |
210 | *((c)++)=(unsigned char)(((l) )&0xff)) | 179 | *((c)++)=(unsigned char)(((l) )&0xff)) |
211 | 180 | ||
212 | /* NOTE - c is not incremented as per l2c */ | ||
213 | #define l2cn(l1,l2,c,n) { \ | ||
214 | c+=n; \ | ||
215 | switch (n) { \ | ||
216 | case 8: *(--(c))=(unsigned char)(((l2)>>24)&0xff); \ | ||
217 | case 7: *(--(c))=(unsigned char)(((l2)>>16)&0xff); \ | ||
218 | case 6: *(--(c))=(unsigned char)(((l2)>> 8)&0xff); \ | ||
219 | case 5: *(--(c))=(unsigned char)(((l2) )&0xff); \ | ||
220 | case 4: *(--(c))=(unsigned char)(((l1)>>24)&0xff); \ | ||
221 | case 3: *(--(c))=(unsigned char)(((l1)>>16)&0xff); \ | ||
222 | case 2: *(--(c))=(unsigned char)(((l1)>> 8)&0xff); \ | ||
223 | case 1: *(--(c))=(unsigned char)(((l1) )&0xff); \ | ||
224 | } \ | ||
225 | } | ||
226 | |||
227 | #define n2s(c,s) ((s=(((unsigned int)(c[0]))<< 8)| \ | 181 | #define n2s(c,s) ((s=(((unsigned int)(c[0]))<< 8)| \ |
228 | (((unsigned int)(c[1])) )),c+=2) | 182 | (((unsigned int)(c[1])) )),c+=2) |
229 | #define s2n(s,c) ((c[0]=(unsigned char)(((s)>> 8)&0xff), \ | 183 | #define s2n(s,c) ((c[0]=(unsigned char)(((s)>> 8)&0xff), \ |
230 | c[1]=(unsigned char)(((s) )&0xff)),c+=2) | 184 | c[1]=(unsigned char)(((s) )&0xff)),c+=2) |
231 | 185 | ||
232 | #define n2l3(c,l) ((l =(((unsigned long)(c[0]))<<16)| \ | ||
233 | (((unsigned long)(c[1]))<< 8)| \ | ||
234 | (((unsigned long)(c[2])) )),c+=3) | ||
235 | |||
236 | #define l2n3(l,c) ((c[0]=(unsigned char)(((l)>>16)&0xff), \ | 186 | #define l2n3(l,c) ((c[0]=(unsigned char)(((l)>>16)&0xff), \ |
237 | c[1]=(unsigned char)(((l)>> 8)&0xff), \ | 187 | c[1]=(unsigned char)(((l)>> 8)&0xff), \ |
238 | c[2]=(unsigned char)(((l) )&0xff)),c+=3) | 188 | c[2]=(unsigned char)(((l) )&0xff)),c+=3) |