Prepare to convert various types to size_t.
This makes some behaviorally-invariant changes to make certain code that
currently only works correctly with signed types work safely regardless of the
signedness of the types in question. This is preparation for a future change
that will convert a variety of types to size_t.
There are also some formatting changes (e.g. converting "enum hack" usage to real consts) to make it simpler to just change "int" to "size_t" in the future to change the types of those constants.
BUG=none
R=andrew@webrtc.org, juberti@webrtc.org, kwiberg@webrtc.org
TBR=ajm
Review URL: https://codereview.webrtc.org/1174813003
Cr-Commit-Position: refs/heads/master@{#9413}
diff --git a/webrtc/modules/audio_coding/neteq/test/RTPencode.cc b/webrtc/modules/audio_coding/neteq/test/RTPencode.cc
index 7d8d60d..1ef9ce5 100644
--- a/webrtc/modules/audio_coding/neteq/test/RTPencode.cc
+++ b/webrtc/modules/audio_coding/neteq/test/RTPencode.cc
@@ -450,7 +450,10 @@
CHECK_NOT_NULL(out_file);
printf("Output file: %s\n\n", argv[2]);
packet_size = atoi(argv[3]);
- CHECK_NOT_NULL(packet_size);
+ if (packet_size <= 0) {
+ printf("Packet size %d must be positive", packet_size);
+ return -1;
+ }
printf("Packet size: %i\n", packet_size);
// check for stereo