Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
09df354e
Commit
09df354e
authored
Feb 01, 2018
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
odb_loose: HEADER_LEN -> MAX_HEADER_LEN
`MAX_HEADER_LEN` is a more descriptive constant name.
parent
909a1992
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
src/odb_loose.c
+7
-7
No files found.
src/odb_loose.c
View file @
09df354e
...
...
@@ -22,7 +22,7 @@
#include "git2/types.h"
/* maximum possible header length */
#define HEADER_LEN 64
#define
MAX_
HEADER_LEN 64
typedef
struct
{
/* object header data */
git_otype
type
;
/* object type */
...
...
@@ -37,7 +37,7 @@ typedef struct {
typedef
struct
{
git_odb_stream
stream
;
git_map
map
;
char
start
[
HEADER_LEN
];
char
start
[
MAX_
HEADER_LEN
];
size_t
start_len
;
size_t
start_read
;
git_zstream
zstream
;
...
...
@@ -273,7 +273,7 @@ done:
static
int
read_loose_standard
(
git_rawobj
*
out
,
git_buf
*
obj
)
{
git_zstream
zstream
=
GIT_ZSTREAM_INIT
;
unsigned
char
head
[
HEADER_LEN
],
*
body
=
NULL
;
unsigned
char
head
[
MAX_
HEADER_LEN
],
*
body
=
NULL
;
size_t
decompressed
,
head_len
,
body_len
,
alloc_size
;
obj_hdr
hdr
;
int
error
;
...
...
@@ -387,7 +387,7 @@ static int read_header_loose_standard(
{
git_zstream
zs
=
GIT_ZSTREAM_INIT
;
obj_hdr
hdr
;
unsigned
char
inflated
[
HEADER_LEN
];
unsigned
char
inflated
[
MAX_
HEADER_LEN
];
size_t
header_len
,
inflated_len
=
sizeof
(
inflated
);
int
error
;
...
...
@@ -822,7 +822,7 @@ static int loose_backend__writestream(git_odb_stream **stream_out, git_odb_backe
{
loose_backend
*
backend
;
loose_writestream
*
stream
=
NULL
;
char
hdr
[
HEADER_LEN
];
char
hdr
[
MAX_
HEADER_LEN
];
git_buf
tmp_path
=
GIT_BUF_INIT
;
int
hdrlen
;
...
...
@@ -934,7 +934,7 @@ static int loose_backend__readstream_standard(
obj_hdr
*
hdr
,
loose_readstream
*
stream
)
{
unsigned
char
head
[
HEADER_LEN
];
unsigned
char
head
[
MAX_
HEADER_LEN
];
size_t
init
,
head_len
;
int
error
;
...
...
@@ -1038,7 +1038,7 @@ static int loose_backend__write(git_odb_backend *_backend, const git_oid *oid, c
{
int
error
=
0
,
header_len
;
git_buf
final_path
=
GIT_BUF_INIT
;
char
header
[
HEADER_LEN
];
char
header
[
MAX_
HEADER_LEN
];
git_filebuf
fbuf
=
GIT_FILEBUF_INIT
;
loose_backend
*
backend
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment