Fix ordered comparison warnings in the RTPtimeshift unit test

Original CL uploaded here: http://review.webrtc.org/933013/

Removing the checks if (argv[4/5] >= 0), they are not doing anything useful.

BUG=

Review URL: https://webrtc-codereview.appspot.com/933019

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3118 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
tina.legrand@webrtc.org 2012-11-16 15:34:32 +00:00
parent b2f474e8bb
commit d0acdf6e2b

View File

@ -22,25 +22,23 @@
#define FIRSTLINELEN 40
int main(int argc, char* argv[])
{
if(argc < 4 || argc > 6)
{
printf("Usage: RTPtimeshift in.rtp out.rtp newStartTS [newStartSN [newStartArrTime]]\n");
int main(int argc, char* argv[]) {
if (argc < 4 || argc > 6) {
printf(
"Usage: RTPtimeshift in.rtp out.rtp newStartTS "
"[newStartSN [newStartArrTime]]\n");
exit(1);
}
FILE *inFile = fopen(argv[1], "rb");
if (!inFile)
{
if (!inFile) {
printf("Cannot open input file %s\n", argv[1]);
return (-1);
}
printf("Input RTP file: %s\n", argv[1]);
FILE *outFile = fopen(argv[2], "wb");
if (!outFile)
{
if (!outFile) {
printf("Cannot open output file %s\n", argv[2]);
return (-1);
}
@ -57,8 +55,7 @@ int main(int argc, char* argv[])
fwrite(firstline, 1, kRtpDumpHeaderSize, outFile));
NETEQTEST_RTPpacket packet;
int packLen = packet.readFromFile(inFile);
if (packLen < 0)
{
if (packLen < 0) {
exit(1);
}
@ -66,19 +63,14 @@ int main(int argc, char* argv[])
WebRtc_UWord32 TSdiff = atoi(argv[3]) - packet.timeStamp();
WebRtc_UWord16 SNdiff = 0;
WebRtc_UWord32 ATdiff = 0;
if (argc > 4)
{
if (argv[4] >= 0)
if (argc > 4) {
SNdiff = atoi(argv[4]) - packet.sequenceNumber();
if (argc > 5)
{
if (argv[5] >= 0)
if (argc > 5) {
ATdiff = atoi(argv[5]) - packet.time();
}
}
while (packLen >= 0)
{
while (packLen >= 0) {
packet.setTimeStamp(packet.timeStamp() + TSdiff);
packet.setSequenceNumber(packet.sequenceNumber() + SNdiff);