mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-03 01:41:03 +00:00
posix: declare 'buf' argument of p_write() as const
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
This commit is contained in:
parent
03cdbab410
commit
2ba222c5c5
@ -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;
|
||||
const char *b = buf;
|
||||
while (cnt) {
|
||||
ssize_t r = write(fd, b, cnt);
|
||||
if (r < 0) {
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user