summaryrefslogtreecommitdiff
path: root/src/basic/prioq.c
Commit message (Collapse)AuthorAgeFilesLines
* prioq: make prioq_reshuffle() voidLennart Poettering2022-12-231-3/+2
| | | | | | | | | | | We never use the return value, and it's confusing and kinda pointless what we return there. Hence drop it. Originally noticed by: tristone13th <tristone13th@outlook.com> Alternative to: #25810
* prioq: introduce prioq_ensure_put()Yu Watanabe2021-09-281-0/+10
|
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* basic/prioq: add prioq_peek_item()Zbigniew Jędrzejewski-Szmek2019-01-261-4/+3
|
* tree-wide: use SWAP_TWO a bit moreLennart Poettering2018-11-261-9/+2
|
* prioq: use structrued initializerYu Watanabe2018-10-171-2/+5
|
* prioq: fix index range checkYu Watanabe2018-10-171-1/+1
|
* prioq: add one more assertionYu Watanabe2018-10-171-0/+1
|
* util: fix segfault in prioq_remove() with empty Prioq objectYu Watanabe2018-10-161-0/+3
|
* tree-wide: remove Lennart's copyright linesLennart Poettering2018-06-141-3/+0
| | | | | | | | | | | These lines are generally out-of-date, incomplete and unnecessary. With SPDX and git repository much more accurate and fine grained information about licensing and authorship is available, hence let's drop the per-file copyright notice. Of course, removing copyright lines of others is problematic, hence this commit only removes my own lines and leaves all others untouched. It might be nicer if sooner or later those could go away too, making git the only and accurate source of authorship information.
* tree-wide: drop 'This file is part of systemd' blurbLennart Poettering2018-06-141-2/+0
| | | | | | | | | | | | | | | | This part of the copyright blurb stems from the GPL use recommendations: https://www.gnu.org/licenses/gpl-howto.en.html The concept appears to originate in times where version control was per file, instead of per tree, and was a way to glue the files together. Ultimately, we nowadays don't live in that world anymore, and this information is entirely useless anyway, as people are very welcome to copy these files into any projects they like, and they shouldn't have to change bits that are part of our copyright header for that. hence, let's just get rid of this old cruft, and shorten our codebase a bit.
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-04-061-13/+0
| | | | | | | | | | Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
* coccinelle: add reallocarray() coccinelle scriptLennart Poettering2018-03-021-1/+1
| | | | | Let's systematically make use of reallocarray() whereever we invoke realloc() with a product of two values.
* Add SPDX license identifiers to source files under the LGPLZbigniew Jędrzejewski-Szmek2017-11-191-0/+1
| | | | | This follows what the kernel is doing, c.f. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5fd54ace4721fc5ce2bb5aef6318fcf17f421460.
* tree-wide: use mfree moreZbigniew Jędrzejewski-Szmek2016-10-161-3/+1
|
* tree-wide: remove Emacs lines from all filesDaniel Mack2016-02-101-2/+0
| | | | | This should be handled fine now by .dir-locals.el, so need to carry that stuff in every file.
* basic: re-sort includesThomas Hindoe Paaboel Andersen2015-12-011-1/+1
| | | | | My previous patch to only include what we use accidentially placed the added inlcudes in non-sorted order.
* basic: include only what we useThomas Hindoe Paaboel Andersen2015-11-301-1/+4
| | | | | This is a cleaned up result of running iwyu but without forward declarations on src/basic.
* util-lib: split out allocation calls into alloc-util.[ch]Lennart Poettering2015-10-271-1/+2
|
* Merge pull request #1407 from dvdhrm/prioqLennart Poettering2015-09-291-1/+1
|\ | | | | prioq: drop stability guarantee
| * prioq: never shuffle identical entriesDavid Herrmann2015-09-291-1/+1
| | | | | | | | | | Skip shuffling identical entries in shuffle_up(), just like we already do in shuffle_down().
* | prioq: add introduction commentDavid Herrmann2015-09-291-0/+10
|/ | | | | | | Add comment to prioq.c explaining what it does. And more importantly, mention that we implement a Heap. It's more than annoying having to figure out what the code actually does, without ever mentioning the word 'heap'.
* build-sys: split internal basic/ library from shared/Kay Sievers2015-06-111-0/+308
basic/ can be used by everything cannot use anything outside of basic/ libsystemd/ can use basic/ cannot use shared/ shared/ can use libsystemd/