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

Side by Side Diff: third_party/lzma_sdk/7zBuf.c

Issue 10152012: Second attempt to update lzma_sdk to 9.20 (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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 | « third_party/lzma_sdk/7zBuf.h ('k') | third_party/lzma_sdk/7zCrc.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /* 7zBuf.c -- Byte Buffer
2 2008-03-28
3 Igor Pavlov
4 Public domain */
5
6 #include "7zBuf.h"
7
8 void Buf_Init(CBuf *p)
9 {
10 p->data = 0;
11 p->size = 0;
12 }
13
14 int Buf_Create(CBuf *p, size_t size, ISzAlloc *alloc)
15 {
16 p->size = 0;
17 if (size == 0)
18 {
19 p->data = 0;
20 return 1;
21 }
22 p->data = (Byte *)alloc->Alloc(alloc, size);
23 if (p->data != 0)
24 {
25 p->size = size;
26 return 1;
27 }
28 return 0;
29 }
30
31 void Buf_Free(CBuf *p, ISzAlloc *alloc)
32 {
33 alloc->Free(alloc, p->data);
34 p->data = 0;
35 p->size = 0;
36 }
OLDNEW
« no previous file with comments | « third_party/lzma_sdk/7zBuf.h ('k') | third_party/lzma_sdk/7zCrc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698