Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Side by Side Diff: nspr/pr/src/io/priometh.c

Issue 1019063003: Update to NSPR 4.10.8 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/nss.git@master
Patch Set: README bump Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « nspr/pr/src/io/prfdcach.c ('k') | nspr/pr/src/io/prlog.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 2
3 /* This Source Code Form is subject to the terms of the Mozilla Public 3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "primpl.h" 6 #include "primpl.h"
7 7
8 #include <string.h> 8 #include <string.h>
9 9
10 /*****************************************************************************/ 10 /*****************************************************************************/
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 (PRSendfileFN)_PR_InvalidInt, 44 (PRSendfileFN)_PR_InvalidInt,
45 (PRConnectcontinueFN)_PR_InvalidStatus, 45 (PRConnectcontinueFN)_PR_InvalidStatus,
46 (PRReservedFN)_PR_InvalidInt, 46 (PRReservedFN)_PR_InvalidInt,
47 (PRReservedFN)_PR_InvalidInt, 47 (PRReservedFN)_PR_InvalidInt,
48 (PRReservedFN)_PR_InvalidInt, 48 (PRReservedFN)_PR_InvalidInt,
49 (PRReservedFN)_PR_InvalidInt 49 (PRReservedFN)_PR_InvalidInt
50 }; 50 };
51 51
52 PRIntn _PR_InvalidInt(void) 52 PRIntn _PR_InvalidInt(void)
53 { 53 {
54 PR_ASSERT(!"I/O method is invalid"); 54 PR_NOT_REACHED("I/O method is invalid");
55 PR_SetError(PR_INVALID_METHOD_ERROR, 0); 55 PR_SetError(PR_INVALID_METHOD_ERROR, 0);
56 return -1; 56 return -1;
57 } /* _PR_InvalidInt */ 57 } /* _PR_InvalidInt */
58 58
59 PRInt16 _PR_InvalidInt16(void) 59 PRInt16 _PR_InvalidInt16(void)
60 { 60 {
61 PR_ASSERT(!"I/O method is invalid"); 61 PR_NOT_REACHED("I/O method is invalid");
62 PR_SetError(PR_INVALID_METHOD_ERROR, 0); 62 PR_SetError(PR_INVALID_METHOD_ERROR, 0);
63 return -1; 63 return -1;
64 } /* _PR_InvalidInt */ 64 } /* _PR_InvalidInt */
65 65
66 PRInt64 _PR_InvalidInt64(void) 66 PRInt64 _PR_InvalidInt64(void)
67 { 67 {
68 PRInt64 rv; 68 PRInt64 rv;
69 LL_I2L(rv, -1); 69 LL_I2L(rv, -1);
70 PR_ASSERT(!"I/O method is invalid"); 70 PR_NOT_REACHED("I/O method is invalid");
71 PR_SetError(PR_INVALID_METHOD_ERROR, 0); 71 PR_SetError(PR_INVALID_METHOD_ERROR, 0);
72 return rv; 72 return rv;
73 } /* _PR_InvalidInt */ 73 } /* _PR_InvalidInt */
74 74
75 /* 75 /*
76 * An invalid method that returns PRStatus 76 * An invalid method that returns PRStatus
77 */ 77 */
78 78
79 PRStatus _PR_InvalidStatus(void) 79 PRStatus _PR_InvalidStatus(void)
80 { 80 {
81 PR_ASSERT(!"I/O method is invalid"); 81 PR_NOT_REACHED("I/O method is invalid");
82 PR_SetError(PR_INVALID_METHOD_ERROR, 0); 82 PR_SetError(PR_INVALID_METHOD_ERROR, 0);
83 return PR_FAILURE; 83 return PR_FAILURE;
84 } /* _PR_InvalidDesc */ 84 } /* _PR_InvalidDesc */
85 85
86 /* 86 /*
87 * An invalid method that returns a pointer 87 * An invalid method that returns a pointer
88 */ 88 */
89 89
90 PRFileDesc *_PR_InvalidDesc(void) 90 PRFileDesc *_PR_InvalidDesc(void)
91 { 91 {
92 PR_ASSERT(!"I/O method is invalid"); 92 PR_NOT_REACHED("I/O method is invalid");
93 PR_SetError(PR_INVALID_METHOD_ERROR, 0); 93 PR_SetError(PR_INVALID_METHOD_ERROR, 0);
94 return NULL; 94 return NULL;
95 } /* _PR_InvalidDesc */ 95 } /* _PR_InvalidDesc */
96 96
97 PR_IMPLEMENT(PRDescType) PR_GetDescType(PRFileDesc *file) 97 PR_IMPLEMENT(PRDescType) PR_GetDescType(PRFileDesc *file)
98 { 98 {
99 return file->methods->file_type; 99 return file->methods->file_type;
100 } 100 }
101 101
102 PR_IMPLEMENT(PRStatus) PR_Close(PRFileDesc *fd) 102 PR_IMPLEMENT(PRStatus) PR_Close(PRFileDesc *fd)
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 if (buf) 587 if (buf)
588 PR_DELETE(buf); 588 PR_DELETE(buf);
589 if ((rv >= 0) && (flags & PR_TRANSMITFILE_CLOSE_SOCKET)) 589 if ((rv >= 0) && (flags & PR_TRANSMITFILE_CLOSE_SOCKET))
590 PR_Close(sd); 590 PR_Close(sd);
591 return rv; 591 return rv;
592 } 592 }
593 593
594 #endif 594 #endif
595 595
596 /* priometh.c */ 596 /* priometh.c */
OLDNEW
« no previous file with comments | « nspr/pr/src/io/prfdcach.c ('k') | nspr/pr/src/io/prlog.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698