Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | coccinelle: skip the empty-to-null transformation on the macro itself | Frantisek Sumsal | 2023-01-25 | 1 | -2/+6 |
| | | | | | | | | Since the empty_to_null() function was "macrofied", we need to use a bit of black magic to make Coccinelle avoid running the transformation on the macro itself. Follow-up to ef2409cbde3. | ||||
* | licensing: add spdx to our .cocci files | Zbigniew Jędrzejewski-Szmek | 2021-10-01 | 1 | -0/+1 |
| | | | | | Since those are chunks of code based on our codebase, it's easiest to use the same license. | ||||
* | coccinelle: ignore function transformations causing recursion | Frantisek Sumsal | 2019-04-29 | 1 | -1/+4 |
| | | | | | | | | | | | | | | | | | | | | | | For example, following transformation: - isempty(s) ? NULL : s + empty_to_null(s) would get applied to the empty_to_null function itself as well, causing an infinite recursion, like: --- src/basic/string-util.h +++ /tmp/cocci-output-307-9f76e6-string-util.h @@ -50,11 +50,11 @@ static inline bool isempty(const char *p } static inline const char *empty_to_null(const char *p) { - return isempty(p) ? NULL : p; + return empty_to_null(p); } Let's avoid that by checking the current match position | ||||
* | core: use empty_to_null() where we can | Lennart Poettering | 2017-12-07 | 1 | -0/+5 |