mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-06 22:12:47 -05:00
Replace all 'sizeof(x)/sizeof(*x)' with lenof.
I noticed a few of these in the course of preparing the previous commit. I must have been writing that idiom out by hand for _ages_ before it became totally habitual to #define it as 'lenof' in every codebase I touch. Now I've gone through and replaced all the old verbosity with nice terse lenofs.
This commit is contained in:
10
sshdes.c
10
sshdes.c
@ -1115,20 +1115,14 @@ static const ssh2_cipheralg *const des3_list[] = {
|
||||
&ssh_3des_ssh2
|
||||
};
|
||||
|
||||
const ssh2_ciphers ssh2_3des = {
|
||||
sizeof(des3_list) / sizeof(*des3_list),
|
||||
des3_list
|
||||
};
|
||||
const ssh2_ciphers ssh2_3des = { lenof(des3_list), des3_list };
|
||||
|
||||
static const ssh2_cipheralg *const des_list[] = {
|
||||
&ssh_des_ssh2,
|
||||
&ssh_des_sshcom_ssh2
|
||||
};
|
||||
|
||||
const ssh2_ciphers ssh2_des = {
|
||||
sizeof(des_list) / sizeof(*des_list),
|
||||
des_list
|
||||
};
|
||||
const ssh2_ciphers ssh2_des = { lenof(des_list), des_list };
|
||||
|
||||
const ssh1_cipheralg ssh1_3des = {
|
||||
des3_ssh1_new, des3_ssh1_free, des3_ssh1_sesskey,
|
||||
|
Reference in New Issue
Block a user