diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-01-02 21:01:38 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-01-02 21:01:38 +0100 |
commit | f7d30133221896638f7bf4f66c504255c4b14f48 (patch) | |
tree | 5f3e07a049f388a3a309a615b8884318f6668a98 /nsprpub/pr/tests/lazyinit.c | |
parent | 26b297510a11758727438df4669357a2a2bc42ce (diff) | |
download | UXP-f7d30133221896638f7bf4f66c504255c4b14f48.tar UXP-f7d30133221896638f7bf4f66c504255c4b14f48.tar.gz UXP-f7d30133221896638f7bf4f66c504255c4b14f48.tar.lz UXP-f7d30133221896638f7bf4f66c504255c4b14f48.tar.xz UXP-f7d30133221896638f7bf4f66c504255c4b14f48.zip |
Issue #1338 - Part 1: Update NSPR to 4.24
Diffstat (limited to 'nsprpub/pr/tests/lazyinit.c')
-rw-r--r-- | nsprpub/pr/tests/lazyinit.c | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/nsprpub/pr/tests/lazyinit.c b/nsprpub/pr/tests/lazyinit.c index 4b9a910c3..5ec1c9578 100644 --- a/nsprpub/pr/tests/lazyinit.c +++ b/nsprpub/pr/tests/lazyinit.c @@ -53,49 +53,50 @@ int main(int argc, char **argv) { test = 0; } - else + else { test = atoi(argv[1]); - + } + switch (test) { - case 0: ml = PR_NewLock(); + case 0: ml = PR_NewLock(); break; - + case 1: interval = PR_SecondsToInterval(1); break; - + case 2: thread = PR_CreateThread( - PR_USER_THREAD, lazyEntry, NULL, PR_PRIORITY_NORMAL, - PR_LOCAL_THREAD, PR_JOINABLE_THREAD, 0); + PR_USER_THREAD, lazyEntry, NULL, PR_PRIORITY_NORMAL, + PR_LOCAL_THREAD, PR_JOINABLE_THREAD, 0); break; - - case 3: file = PR_Open("/usr/tmp/", PR_RDONLY, 0); + + case 3: file = PR_Open("/usr/tmp/", PR_RDONLY, 0); break; - - case 4: udp = PR_NewUDPSocket(); + + case 4: udp = PR_NewUDPSocket(); break; - - case 5: tcp = PR_NewTCPSocket(); + + case 5: tcp = PR_NewTCPSocket(); break; - - case 6: dir = PR_OpenDir("/usr/tmp/"); + + case 6: dir = PR_OpenDir("/usr/tmp/"); break; - + case 7: (void)PR_NewThreadPrivateIndex(&pdkey, NULL); break; - + case 8: path = PR_GetEnv("PATH"); break; - + case 9: status = PR_NewTCPSocketPair(pair); break; - + case 10: PR_SetConcurrency(2); break; - - default: + + default: printf( - "lazyinit: unrecognized command line argument: %s\n", + "lazyinit: unrecognized command line argument: %s\n", argv[1] ); printf( "FAIL\n" ); exit( 1 ); |