Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Unified Diff: srtp/crypto/test/rand_gen.c

Issue 1098043003: Update libsrtp to 1.5.2 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libsrtp@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « srtp/crypto/test/kernel_driver.c ('k') | srtp/crypto/test/rand_gen_soak.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « srtp/crypto/test/kernel_driver.c ('k') | srtp/crypto/test/rand_gen_soak.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698