mirror of
https://github.com/sheumann/65816-crypto.git
synced 2024-11-25 10:30:45 +00:00
Usage message and indentation cleanups in test program.
This commit is contained in:
parent
4ffd064204
commit
d4baf7dbe4
10
aestest.c
10
aestest.c
@ -15,6 +15,8 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <MiscTool.h>
|
||||
#include <Memory.h>
|
||||
#include <orca.h>
|
||||
@ -167,8 +169,14 @@ unsigned long aes128_time_test(unsigned int iters) {
|
||||
int main(int argc, char **argv) {
|
||||
unsigned int test_iters = 0;
|
||||
|
||||
if (argc > 1)
|
||||
if (argc > 1) {
|
||||
errno = 0;
|
||||
test_iters = strtoul(argv[1], NULL, 10);
|
||||
if (argc > 2 || errno != 0) {
|
||||
fprintf(stderr, "Usage: aestest [test_iters]\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
printf("AES-128 test:\n");
|
||||
aes128_test();
|
||||
|
Loading…
Reference in New Issue
Block a user