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
49ae22ba
Commit
49ae22ba
authored
Dec 10, 2014
by
Carlos Martín Nieto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stream: constify the write buffer
parent
1b75c29e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
include/git2/sys/stream.h
+1
-1
src/openssl_stream.c
+1
-1
src/socket_stream.c
+1
-1
src/stream.h
+1
-1
No files found.
include/git2/sys/stream.h
View file @
49ae22ba
...
...
@@ -32,7 +32,7 @@ typedef struct git_stream {
int
(
*
connect
)(
struct
git_stream
*
);
int
(
*
certificate
)(
git_cert
**
,
struct
git_stream
*
);
ssize_t
(
*
read
)(
struct
git_stream
*
,
void
*
,
size_t
);
ssize_t
(
*
write
)(
struct
git_stream
*
,
void
*
,
size_t
,
int
);
ssize_t
(
*
write
)(
struct
git_stream
*
,
const
char
*
,
size_t
,
int
);
int
(
*
close
)(
struct
git_stream
*
);
void
(
*
free
)(
struct
git_stream
*
);
}
git_stream
;
...
...
src/openssl_stream.c
View file @
49ae22ba
...
...
@@ -277,7 +277,7 @@ int openssl_certificate(git_cert **out, git_stream *stream)
return
0
;
}
ssize_t
openssl_write
(
git_stream
*
stream
,
void
*
data
,
size_t
len
,
int
flags
)
ssize_t
openssl_write
(
git_stream
*
stream
,
const
char
*
data
,
size_t
len
,
int
flags
)
{
openssl_stream
*
st
=
(
openssl_stream
*
)
stream
;
int
ret
;
...
...
src/socket_stream.c
View file @
49ae22ba
...
...
@@ -131,7 +131,7 @@ int socket_connect(git_stream *stream)
return
0
;
}
ssize_t
socket_write
(
git_stream
*
stream
,
void
*
data
,
size_t
len
,
int
flags
)
ssize_t
socket_write
(
git_stream
*
stream
,
const
char
*
data
,
size_t
len
,
int
flags
)
{
ssize_t
ret
;
size_t
off
=
0
;
...
...
src/stream.h
View file @
49ae22ba
...
...
@@ -30,7 +30,7 @@ GIT_INLINE(ssize_t) git_stream_read(git_stream *st, void *data, size_t len)
return
st
->
read
(
st
,
data
,
len
);
}
GIT_INLINE
(
ssize_t
)
git_stream_write
(
git_stream
*
st
,
void
*
data
,
size_t
len
,
int
flags
)
GIT_INLINE
(
ssize_t
)
git_stream_write
(
git_stream
*
st
,
const
char
*
data
,
size_t
len
,
int
flags
)
{
return
st
->
write
(
st
,
data
,
len
,
flags
);
}
...
...
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