Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMark Harris <mark.hsj@gmail.com>2016-07-22 07:22:22 +0300
committerMark Harris <mark.hsj@gmail.com>2016-07-22 07:22:22 +0300
commitd401961a1858c616fac95ffc8065539a47c3f2df (patch)
tree09e362918c20b5d1d21869558534a4ce511df9f0 /tests
parentde473b305c6e18587ee3c205b313e75356e3f540 (diff)
tests: Avoid shift into sign undefined behavior
Diffstat (limited to 'tests')
-rw-r--r--tests/test_opus_decode.c2
-rw-r--r--tests/test_opus_encode.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_opus_decode.c b/tests/test_opus_decode.c
index 9c0eb9c7..5ab16acc 100644
--- a/tests/test_opus_decode.c
+++ b/tests/test_opus_decode.c
@@ -436,7 +436,7 @@ int main(int _argc, char **_argv)
iseed=atoi(env_seed);
env_used=1;
}
- else iseed=(opus_uint32)time(NULL)^((getpid()&65535)<<16);
+ else iseed=(opus_uint32)time(NULL)^(((opus_uint32)getpid()&65535)<<16);
Rw=Rz=iseed;
oversion=opus_get_version_string();
diff --git a/tests/test_opus_encode.c b/tests/test_opus_encode.c
index 132d074d..705e70bc 100644
--- a/tests/test_opus_encode.c
+++ b/tests/test_opus_encode.c
@@ -490,7 +490,7 @@ int main(int _argc, char **_argv)
iseed=atoi(env_seed);
env_used=1;
}
- else iseed=(opus_uint32)time(NULL)^((getpid()&65535)<<16);
+ else iseed=(opus_uint32)time(NULL)^(((opus_uint32)getpid()&65535)<<16);
Rw=Rz=iseed;
oversion=opus_get_version_string();