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
2ba222c5
Commit
2ba222c5
authored
Jul 15, 2011
by
Kirill A. Shutemov
Committed by
Vicent Marti
Jul 25, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
posix: declare 'buf' argument of p_write() as const
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
parent
03cdbab4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
src/posix.c
+2
-2
src/posix.h
+1
-1
No files found.
src/posix.c
View file @
2ba222c5
...
...
@@ -32,9 +32,9 @@ int p_read(git_file fd, void *buf, size_t cnt)
return
(
int
)(
b
-
(
char
*
)
buf
);
}
int
p_write
(
git_file
fd
,
void
*
buf
,
size_t
cnt
)
int
p_write
(
git_file
fd
,
const
void
*
buf
,
size_t
cnt
)
{
char
*
b
=
buf
;
c
onst
c
har
*
b
=
buf
;
while
(
cnt
)
{
ssize_t
r
=
write
(
fd
,
b
,
cnt
);
if
(
r
<
0
)
{
...
...
src/posix.h
View file @
2ba222c5
...
...
@@ -40,7 +40,7 @@ typedef int git_file;
extern
int
p_open
(
const
char
*
path
,
int
flags
);
extern
int
p_creat
(
const
char
*
path
,
int
mode
);
extern
int
p_read
(
git_file
fd
,
void
*
buf
,
size_t
cnt
);
extern
int
p_write
(
git_file
fd
,
void
*
buf
,
size_t
cnt
);
extern
int
p_write
(
git_file
fd
,
const
void
*
buf
,
size_t
cnt
);
extern
int
p_getcwd
(
char
*
buffer_out
,
size_t
size
);
#define p_lseek(f,n,w) lseek(f, n, w)
...
...
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