summaryrefslogtreecommitdiff
path: root/src/basic/strbuf.c
Commit message (Collapse)AuthorAgeFilesLines
* 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-2/+1
|
* strbuf: set the proper character when creating new nodesLubomir Rintel2016-05-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 82501b3fc added an early break when a terminal node is found to incorrect place -- before setting c. This caused trie to be built that does not correspond to what it points to in buffer, causing incorrect deduplications: # cat /etc/udev/rules.d/99-bug.rules ENV{FOO}=="0" ENV{xx0}=="BAR" ENV{BAZ}=="00" # udevadm test * RULE /etc/udev/rules.d/99-bug.rules:1, token: 0, count: 2, label: '' M ENV match 'FOO' '0'(plain) * RULE /etc/udev/rules.d/99-bug.rules:2, token: 2, count: 2, label: '' M ENV match 'xx0' 'BAR'(plain) * RULE /etc/udev/rules.d/99-bug.rules:3, token: 4, count: 2, label: '' M ENV match 'BAZ' 'x0'(plain) * END The addition of "xx0" following "0" will cause a trie like this to be created: c=\0 c=0 "0" c=0 "xx0" <-- note the c is incorrect here, causing "00" to be c=O "FOO" deduplicated to it c=R "BAR" This in effect caused the usb_modeswitch rule for Huawei modems to never match and this never be switched to serial mode from mass storage.
* tree-wide: make ++/-- usage consistent WRT spacingVito Caputo2016-02-221-1/+1
| | | | | | Throughout the tree there's spurious use of spaces separating ++ and -- operators from their respective operands. Make ++ and -- operator consistent with the majority of existing uses; discard the spaces.
* basic/strbuf: do not call bsearch with a null argumentZbigniew Jędrzejewski-Szmek2016-02-181-0/+4
| | | | | | | Das ist verboten! src/basic/strbuf.c:162:23: runtime error: null pointer passed as argument 2, which is declared to never be null
* 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: include only what we useThomas Hindoe Paaboel Andersen2015-11-301-1/+1
| | | | | 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
|
* build-sys: split internal basic/ library from shared/Kay Sievers2015-06-111-0/+201
basic/ can be used by everything cannot use anything outside of basic/ libsystemd/ can use basic/ cannot use shared/ shared/ can use libsystemd/