summaryrefslogtreecommitdiff
path: root/src/libostree/ostree-bloom.c
Commit message (Collapse)AuthorAgeFilesLines
* Update FSF license notices to use URL instead of addressJoseph Marrero2021-12-071-3/+1
|
* Add SPDX-License-Identifier to source filesMarcus Folkesson2018-01-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | SPDX License List is a list of (common) open source licenses that can be referred to by a “short identifier”. It has several advantages compared to the common "license header texts" usually found in source files. Some of the advantages: * It is precise; there is no ambiguity due to variations in license header text * It is language neutral * It is easy to machine process * It is concise * It is simple and can be used without much cost in interpreted environments like java Script, etc. * An SPDX license identifier is immutable. * It provides simple guidance for developers who want to make sure the license for their code is respected See http://spdx.org for further reading. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Closes: #1439 Approved by: cgwalters
* lib/bloom: Add some missing preconditions on n_bytesPhilip Withnall2017-10-021-1/+3
| | | | | | | | | | | | | | These shouldn’t change the bloom filter’s behaviour at all, but make it a bit more obvious what the programmatical limitations are on the sizes it can deal with. In reality, those sizes should never be reached because they won’t fit in a DNS-SD record. Signed-off-by: Philip Withnall <withnall@endlessm.com> Closes: #1239 Approved by: cgwalters
* lib/bloom: Fix a -Wconversion warning in OstreeBloomPhilip Withnall2017-10-011-1/+1
| | | | | | | | | | | | | Compiling with -Wconversion warns on this line, as the conversion from guint64 to guint8 is implicit (but safe: there is no bug here, since the implicit cast is applied after the modulus arithmetic). Make the cast explicit to silence -Wconversion. Signed-off-by: Philip Withnall <withnall@endlessm.com> Closes: #1231 Approved by: cgwalters
* lib/bloom: Fix bloom hashing on 32-bit architecturesPhilip Withnall2017-10-011-4/+4
| | | | | | | | | | | | | | There was an implicit cast from guint64 to gsize (which is 32-bit on armhf, for example) before the modulus arithmetic which safely narrows the index. Fix that by using a guint64 intermediate variable and making the cast explicit. Signed-off-by: Philip Withnall <withnall@endlessm.com> Closes: #1231 Approved by: cgwalters
* tree-wide: Remove Emacs modelinesColin Walters2017-09-211-2/+1
| | | | | | | | | We added a `.dir-locals.el` in commit: 9a77017d87b74c5e2895cdd64ad098018929403f There's no need to have it per-file, with that people might think to add other editors, which is the wrong direction. Closes: #1206 Approved by: jlebon
* lib/bloom: Add an internal bloom filter implementationPhilip Withnall2017-06-261-0/+603
This will be used in an upcoming commit. It adds a basic bloom filter implementation, using the SipHash family of hash functions. The implementation (including its parameter choices and hash functions) will become a protocol detail in future, so must not be changed so that its output is bitwise incompatible between OSTree versions. Unit tests are included. Signed-off-by: Philip Withnall <withnall@endlessm.com> Closes: #924 Approved by: cgwalters