| Index: srtp/crypto/test/rand_gen.c
|
| diff --git a/srtp/crypto/test/rand_gen.c b/srtp/crypto/test/rand_gen.c
|
| index 8bb8b88d86dedb2766630c18d0f197e7f035a6f5..b8051d5b281856de7510cb219ce2a562dd3beaaf 100644
|
| --- a/srtp/crypto/test/rand_gen.c
|
| +++ b/srtp/crypto/test/rand_gen.c
|
| @@ -48,7 +48,7 @@
|
| #endif
|
|
|
| #include <stdio.h> /* for printf() */
|
| -#include <unistd.h> /* for getopt() */
|
| +#include "getopt_s.h"
|
| #include "crypto_kernel.h"
|
|
|
| /*
|
| @@ -72,7 +72,6 @@ usage(char *prog_name) {
|
|
|
| int
|
| main (int argc, char *argv[]) {
|
| - extern char *optarg;
|
| int q;
|
| int num_octets = 0;
|
| unsigned do_list_mods = 0;
|
| @@ -90,14 +89,14 @@ main (int argc, char *argv[]) {
|
|
|
| /* process input arguments */
|
| while (1) {
|
| - q = getopt(argc, argv, "ld:n:");
|
| + q = getopt_s(argc, argv, "ld:n:");
|
| if (q == -1)
|
| break;
|
| switch (q) {
|
| case 'd':
|
| - status = crypto_kernel_set_debug_module(optarg, 1);
|
| + status = crypto_kernel_set_debug_module(optarg_s, 1);
|
| if (status) {
|
| - printf("error: set debug module (%s) failed\n", optarg);
|
| + printf("error: set debug module (%s) failed\n", optarg_s);
|
| exit(1);
|
| }
|
| break;
|
| @@ -105,7 +104,7 @@ main (int argc, char *argv[]) {
|
| do_list_mods = 1;
|
| break;
|
| case 'n':
|
| - num_octets = atoi(optarg);
|
| + num_octets = atoi(optarg_s);
|
| if (num_octets < 0 || num_octets > BUF_LEN)
|
| usage(argv[0]);
|
| break;
|
|
|