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

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

Issue 16982002: Linux: fix compatibility with nss-3.15 . (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nssutil! Created 7 years, 6 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 "seccomon.h" 10 #include "seccomon.h"
10 #include "secitem.h" 11 #include "secitem.h"
11 #include "secerr.h" 12 #include "secerr.h"
12 #include "secport.h" 13 #include "secport.h"
13 14
14 typedef struct SECItemArrayStr SECItemArray; 15 typedef struct SECItemArrayStr SECItemArray;
15 16
17 #define NSSUTIL_VERSION_NUM \
18 (NSSUTIL_VMAJOR * 10000 + NSSUTIL_VMINOR * 100 + NSSUTIL_VPATCH)
19 #if NSSUTIL_VERSION_NUM < 31500
20 // Added in NSS 3.15.
16 struct SECItemArrayStr { 21 struct SECItemArrayStr {
17 SECItem *items; 22 SECItem *items;
18 unsigned int len; 23 unsigned int len;
19 }; 24 };
25 #endif
20 26
21 SECItemArray * 27 SECItemArray *
22 SECITEM_AllocArray(PLArenaPool *arena, SECItemArray *array, unsigned int len) 28 SECITEM_AllocArray(PLArenaPool *arena, SECItemArray *array, unsigned int len)
23 { 29 {
24 SECItemArray *result = NULL; 30 SECItemArray *result = NULL;
25 void *mark = NULL; 31 void *mark = NULL;
26 32
27 if (arena != NULL) { 33 if (arena != NULL) {
28 mark = PORT_ArenaMark(arena); 34 mark = PORT_ArenaMark(arena);
29 } 35 }
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 SECStatus rv = SECITEM_CopyItem(arena, 142 SECStatus rv = SECITEM_CopyItem(arena,
137 &result->items[i], &from->items[i]); 143 &result->items[i], &from->items[i]);
138 if (rv != SECSuccess) { 144 if (rv != SECSuccess) {
139 SECITEM_ZfreeArray(result, PR_TRUE); 145 SECITEM_ZfreeArray(result, PR_TRUE);
140 return NULL; 146 return NULL;
141 } 147 }
142 } 148 }
143 149
144 return result; 150 return result;
145 } 151 }
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