diff options
| author | Vicent Marti <tanoku@gmail.com> | 2011-04-02 12:42:04 +0300 |
|---|---|---|
| committer | Vicent Marti <tanoku@gmail.com> | 2011-04-02 12:42:04 +0300 |
| commit | 720d5472f8aa629161749450a27d3a4e3ecefea3 (patch) | |
| tree | b591a0f297492ee99f68fb5b512f932f8c0c9b8a /src/signature.c | |
| parent | d8ad64d3669182d368120a9b8db1147421498e22 (diff) | |
| download | libgit2-720d5472f8aa629161749450a27d3a4e3ecefea3.tar.gz | |
Change `parse` methods to const buffer
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Diffstat (limited to 'src/signature.c')
| -rw-r--r-- | src/signature.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/signature.c b/src/signature.c index 412637600..0c99755d4 100644 --- a/src/signature.c +++ b/src/signature.c @@ -109,14 +109,14 @@ static int parse_timezone_offset(const char *buffer, int *offset_out) } -int git_signature__parse(git_signature *sig, char **buffer_out, +int git_signature__parse(git_signature *sig, const char **buffer_out, const char *buffer_end, const char *header) { const size_t header_len = strlen(header); int name_length, email_length; - char *buffer = *buffer_out; - char *line_end, *name_end, *email_end; + const char *buffer = *buffer_out; + const char *line_end, *name_end, *email_end; int offset = 0; memset(sig, 0x0, sizeof(git_signature)); @@ -159,7 +159,7 @@ int git_signature__parse(git_signature *sig, char **buffer_out, if (buffer >= line_end) return GIT_EOBJCORRUPTED; - sig->when.time = strtol(buffer, &buffer, 10); + sig->when.time = strtol(buffer, (char **)&buffer, 10); if (sig->when.time == 0) return GIT_EOBJCORRUPTED; |
