diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2017-06-21 21:13:22 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-06-23 13:34:07 +0200 |
commit | 22da8b1c90297256b6003d178066d51bdada37a8 (patch) | |
tree | f978203b5b9f8e852a99634edf7ec7fc70dda243 /crypto/pbkdf2.c | |
parent | 5113a3dee9f6798dd015500dc33ee29277f37e49 (diff) | |
download | barebox-22da8b1c90297256b6003d178066d51bdada37a8.tar.gz barebox-22da8b1c90297256b6003d178066d51bdada37a8.tar.xz |
ratp: consolidate setting the next AN or SN flags
Setting the next AN or SN flag was being done in two different ways
throughout the code; e.g. here for AN:
ratp_set_an(ratp_sn(hdr) + 1);
or:
ratp_set_an(!ratp_sn(hdr));
We define a pair of new ratp_set_next_sn() and ratp_set_next_an()
macros that make it clear that the next value is desired, and also
hide the computation of the actual flag value within the macro, so the
previous example would now look like:
ratp_set_next_an(ratp_sn(hdr));
Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'crypto/pbkdf2.c')
0 files changed, 0 insertions, 0 deletions