summaryrefslogtreecommitdiffstats
path: root/src/libudev/libudev-list.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* various: inline some iterator variablesZbigniew Jędrzejewski-Szmek2022-03-231-2/+1
|
* list: make LIST_FOREACH() and LIST_FOREACH_BACKWARDS() saferYu Watanabe2022-03-191-1/+1
|
* list: declare iterator of LIST_FOREACH() in the loopYu Watanabe2022-03-191-2/+0
|
* libudev: add one more assertionYu Watanabe2021-02-011-0/+1
|
* libudev: unset uptodate flag before free()ing entriesYu Watanabe2021-02-011-1/+1
| | | | | udev_list_entry_free() also removes the entry from LIST if the flag is set. This slightly optimizes the cleanup logic.
* libudev: also drop the entry from LIST even if unique flag is setYu Watanabe2021-02-011-2/+3
| | | | | | | | Otherwise, the list becomes dirty when an entry is freed. This also remove the entry from the hashmap only when its name is set. The name should be always set, so that does not change anything. But just for safety.
* libudev: set entry->list after the entry is stored in the listYu Watanabe2021-02-011-1/+2
| | | | | | | This should not change anything. As hashmap_remove() is called before hashmap_ensure_put(). So, even if hashmap_ensure_put() fails, a wrong entry will not removed from the hashmap by udev_list_entry_free(). But anyway, just for safety.
* libudev: use hashmap_ensure_put()Yu Watanabe2021-02-011-7/+1
|
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* tree-wide: define iterator inside of the macroZbigniew Jędrzejewski-Szmek2020-09-081-2/+1
|
* libudev: re-implement libudev-list with LIST and hashmapYu Watanabe2019-06-121-193/+105
|
* libudev: hide definition of struct udev_list from other libudev componentsYu Watanabe2019-06-121-5/+35
| | | | | In the later commit, udev_list will be just a wrapper of hashmap or LIST. So, allocating udev_list does not increase much cost.
* libudev: drop unused variableYu Watanabe2019-06-121-1/+0
|
* util: split out memcmp()/memset() related calls into memory-util.[ch]Lennart Poettering2019-03-131-1/+1
| | | | Just some source rearranging.
* Remove 'inline' attributes from static functions in .c files (#11426)Topi Miettinen2019-01-151-1/+1
| | | Let the compiler perform inlining (see #11397).
* libudev-list: drop unused udev argument from udev_list_init()Yu Watanabe2018-11-221-2/+1
|
* libudev-list: drop unused private functionsYu Watanabe2018-11-221-12/+0
|
* libudev: coding style fixesYu Watanabe2018-11-201-7/+7
|
* libudev-list: move libudev-list related definitions to libudev-list-internal.hYu Watanabe2018-11-201-42/+25
| | | | | This also rename libudev-private.h to libudev-util.h, and cleanups several unnecessary headers from udev.h and libudev-util.h
* tree-wide: replace 'unsigned int' with 'unsigned'Yu Watanabe2018-10-191-4/+4
|
* tree-wide: drop copyright headers from frequent contributorsZbigniew Jędrzejewski-Szmek2018-06-201-3/+0
| | | | | | | | Fixes #9320. for p in Shapovalov Chevalier Rozhkov Sievers Mack Herrmann Schmidt Rudenberg Sahani Landden Andersen Watanabe; do git grep -e 'Copyright.*'$p -l|xargs perl -i -0pe 's|/([*][*])?[*]\s+([*#]\s+)?Copyright[^\n]*'$p'[^\n]*\s*[*]([*][*])?/\n*|\n|gms; s|\s+([*#]\s+)?Copyright[^\n]*'$p'[^\n]*\n*|\n|gms' done
* tree-wide: beautify remaining copyright statementsLennart Poettering2018-06-141-1/+1
| | | | | | Let's unify an beautify our remaining copyright statements, with a unicode ©. This means our copyright statements are now always formatted the same way. Yay.
* 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-12/+10
| | | | | 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-171-8/+6
|
* util-lib: split out allocation calls into alloc-util.[ch]Lennart Poettering2015-10-271-2/+3
|
* tree-wide: use coccinelle to patch a lot of code to use mfree()Lennart Poettering2015-09-091-2/+1
| | | | | | | | | | | | | | This replaces this: free(p); p = NULL; by this: p = mfree(p); Change generated using coccinelle. Semantic patch is added to the sources.
* remove unused includesThomas Hindoe Paaboel Andersen2015-02-231-3/+0
| | | | | | This patch removes includes that are not used. The removals were found with include-what-you-use which checks if any of the symbols from a header is in use.
* everywhere: make use of new0() and macro() macros, and stop using perror()Lennart Poettering2014-02-131-1/+1
|
* use memzero(foo, length); for all memset(foo, 0, length); callsGreg KH2014-01-311-1/+1
| | | | | | | | In trying to track down a stupid linker bug, I noticed a bunch of memset() calls that should be using memzero() to make it more "obvious" that the options are correct (i.e. 0 is not the length, but the data to set). So fix up all current calls to memset(foo, 0, length) to memzero(foo, length).
* udev: declare some symbols staticKay Sievers2013-11-121-2/+2
|
* libudev: avoid leak during realloc failureMauro Dreissig2012-11-131-2/+4
|
* libudev: update copyright headersKay Sievers2012-11-121-10/+18
|
* fix a couple of issues found with llvm-analyzeLennart Poettering2012-08-081-0/+1
|
* udev: use container_of() macroLucas De Marchi2012-04-291-6/+2
|
* docs: hook-up gtk-doc to 'make check'Kay Sievers2012-04-201-2/+10
|
* udev: move libudev, gudev to src/; move gudev/docs/, udev/docs/ to to docs/Kay Sievers2012-04-131-0/+340