summaryrefslogtreecommitdiff
path: root/include/git2/sys/index.h
Commit message (Collapse)AuthorAgeFilesLines
* index functions: return an intEdward Thomson2020-01-241-2/+4
| | | | | Stop returning a void for functions, future-proofing them to allow them to fail.
* docs: fix more missing includesEtienne Samson2018-05-071-0/+3
|
* index: fix contradicting comparisonPatrick Steinhardt2016-02-231-1/+1
| | | | | | | | | | | | | | | | | | The overflow check in `read_reuc` tries to verify if the `git__strtol32` parses an integer bigger than UINT_MAX. The `tmp` variable is casted to an unsigned int for this and then checked for being greater than UINT_MAX, which obviously can never be true. Fix this by instead fixing the `mode` field's size in `struct git_index_reuc_entry` to `uint32_t`. We can now parse the int with `git__strtol64`, which can never return a value bigger than `UINT32_MAX`, and additionally checking if the returned value is smaller than zero. We do not need to handle overflows explicitly here, as `git__strtol64` returns an error when the returned value would overflow.
* index: reuc and name entrycounts should be size_tEdward Thomson2014-12-221-2/+2
| | | | | | For the REUC and NAME entries, we use size_t internally, and we take size_t for the get_byindex() functions, but the entrycount() functions strangely cast to an unsigned int instead.
* Clean up some documentationCarlos Martín Nieto2013-07-231-2/+0
| | | | clang's docparser highlighted these.
* Fix trailing whitespacesnulltoken2013-05-151-1/+0
|
* move NAME and REUC extensions to sys/Edward Thomson2013-04-301-0/+180