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/sendzlf.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/sendzlf.c')
-rw-r--r-- | nsprpub/pr/tests/sendzlf.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/nsprpub/pr/tests/sendzlf.c b/nsprpub/pr/tests/sendzlf.c index 0f3df3f74..a65f6cd6b 100644 --- a/nsprpub/pr/tests/sendzlf.c +++ b/nsprpub/pr/tests/sendzlf.c @@ -4,7 +4,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* - * Test: sendzlf.c + * Test: sendzlf.c * * Description: send a zero-length file with PR_SendFile and * PR_TransmitFile. @@ -63,7 +63,7 @@ static void ClientThread(void *arg) exit(1); } if (memcmp(buf, HEADER_STR TRAILER_STR TRAILER_STR HEADER_STR HEADER_STR, - nexpected) != 0) { + nexpected) != 0) { fprintf(stderr, "wrong data is received\n"); exit(1); } @@ -84,7 +84,7 @@ static void ServerThread(void *arg) /* Create a zero-length file */ file = PR_Open(ZERO_LEN_FILE_NAME, - PR_CREATE_FILE|PR_TRUNCATE|PR_RDWR, 0666); + PR_CREATE_FILE|PR_TRUNCATE|PR_RDWR, 0666); if (NULL == file) { fprintf(stderr, "PR_Open failed\n"); exit(1); @@ -105,7 +105,7 @@ static void ServerThread(void *arg) } /* Send both header and trailer */ nbytes = PR_SendFile(acceptSock, &sfd, PR_TRANSMITFILE_KEEP_OPEN, - PR_INTERVAL_NO_TIMEOUT); + PR_INTERVAL_NO_TIMEOUT); if (HEADER_LEN+TRAILER_LEN != nbytes) { fprintf(stderr, "PR_SendFile should return %d but returned %d\n", HEADER_LEN+TRAILER_LEN, nbytes); @@ -114,7 +114,7 @@ static void ServerThread(void *arg) /* Trailer only, no header */ sfd.hlen = 0; nbytes = PR_SendFile(acceptSock, &sfd, PR_TRANSMITFILE_KEEP_OPEN, - PR_INTERVAL_NO_TIMEOUT); + PR_INTERVAL_NO_TIMEOUT); if (TRAILER_LEN != nbytes) { fprintf(stderr, "PR_SendFile should return %d but returned %d\n", TRAILER_LEN, nbytes); @@ -124,7 +124,7 @@ static void ServerThread(void *arg) sfd.hlen = HEADER_LEN; sfd.tlen = 0; nbytes = PR_SendFile(acceptSock, &sfd, PR_TRANSMITFILE_KEEP_OPEN, - PR_INTERVAL_NO_TIMEOUT); + PR_INTERVAL_NO_TIMEOUT); if (HEADER_LEN != nbytes) { fprintf(stderr, "PR_SendFile should return %d but returned %d\n", HEADER_LEN, nbytes); @@ -132,7 +132,7 @@ static void ServerThread(void *arg) } /* Try PR_TransmitFile */ nbytes = PR_TransmitFile(acceptSock, file, header, HEADER_LEN, - PR_TRANSMITFILE_KEEP_OPEN, PR_INTERVAL_NO_TIMEOUT); + PR_TRANSMITFILE_KEEP_OPEN, PR_INTERVAL_NO_TIMEOUT); if (HEADER_LEN != nbytes) { fprintf(stderr, "PR_TransmitFile should return %d but returned %d\n", HEADER_LEN, nbytes); @@ -184,15 +184,15 @@ int main(int argc, char **argv) } clientThread = PR_CreateThread(PR_USER_THREAD, - ClientThread, (void *) PR_ntohs(PR_NetAddrInetPort(&addr)), - PR_PRIORITY_NORMAL, scope, PR_JOINABLE_THREAD, 0); + ClientThread, (void *) PR_ntohs(PR_NetAddrInetPort(&addr)), + PR_PRIORITY_NORMAL, scope, PR_JOINABLE_THREAD, 0); if (NULL == clientThread) { fprintf(stderr, "PR_CreateThread failed\n"); exit(1); } serverThread = PR_CreateThread(PR_USER_THREAD, - ServerThread, listenSock, - PR_PRIORITY_NORMAL, scope, PR_JOINABLE_THREAD, 0); + ServerThread, listenSock, + PR_PRIORITY_NORMAL, scope, PR_JOINABLE_THREAD, 0); if (NULL == serverThread) { fprintf(stderr, "PR_CreateThread failed\n"); exit(1); |