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

Side by Side Diff: net/third_party/nss/ssl/bodge/secitem_array.c

Issue 20561004: Linux: fix compatibility with nss-3.15 and <gcc-4.6 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* This Source Code Form is subject to the terms of the Mozilla Public 1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 4
5 /* 5 /*
6 * Support routines for SECItemArray data structure. 6 * Support routines for SECItemArray data structure.
7 */ 7 */
8 8
9 #include "nssutil.h" 9 #include "nssutil.h"
10 #include "seccomon.h" 10 #include "seccomon.h"
11 #include "secitem.h" 11 #include "secitem.h"
12 #include "secerr.h" 12 #include "secerr.h"
13 #include "secport.h" 13 #include "secport.h"
14 14
15 typedef struct SECItemArrayStr SECItemArray;
16
17 #define NSSUTIL_VERSION_NUM \ 15 #define NSSUTIL_VERSION_NUM \
18 (NSSUTIL_VMAJOR * 10000 + NSSUTIL_VMINOR * 100 + NSSUTIL_VPATCH) 16 (NSSUTIL_VMAJOR * 10000 + NSSUTIL_VMINOR * 100 + NSSUTIL_VPATCH)
19 #if NSSUTIL_VERSION_NUM < 31500 17 #if NSSUTIL_VERSION_NUM < 31500
20 // Added in NSS 3.15. 18 // Added in NSS 3.15.
19 typedef struct SECItemArrayStr SECItemArray;
wtc 2013/07/26 01:30:38 Nit: add a blank line after this line.
Paweł Hajdan Jr. 2013/07/26 18:08:23 Done.
21 struct SECItemArrayStr { 20 struct SECItemArrayStr {
22 SECItem *items; 21 SECItem *items;
23 unsigned int len; 22 unsigned int len;
24 }; 23 };
25 #endif 24 #endif
26 25
27 SECItemArray * 26 SECItemArray *
28 SECITEM_AllocArray(PLArenaPool *arena, SECItemArray *array, unsigned int len) 27 SECITEM_AllocArray(PLArenaPool *arena, SECItemArray *array, unsigned int len)
29 { 28 {
30 SECItemArray *result = NULL; 29 SECItemArray *result = NULL;
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 SECStatus rv = SECITEM_CopyItem(arena, 141 SECStatus rv = SECITEM_CopyItem(arena,
143 &result->items[i], &from->items[i]); 142 &result->items[i], &from->items[i]);
144 if (rv != SECSuccess) { 143 if (rv != SECSuccess) {
145 SECITEM_ZfreeArray(result, PR_TRUE); 144 SECITEM_ZfreeArray(result, PR_TRUE);
146 return NULL; 145 return NULL;
147 } 146 }
148 } 147 }
149 148
150 return result; 149 return result;
151 } 150 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698