emacs/admin/coccinelle/unibyte_string.cocci
Stefan Kangas d91a4133b0 Prefer build_unibyte_string where applicable
* src/fns.c (syms_of_fns):
* src/image.c (slurp_image): Prefer build_unibyte_string (str) to
make_unibyte_string (str, strlen (str)).
* admin/coccinelle/unibyte_string.cocci: Support string literals.
2024-01-04 03:42:28 +01:00

12 lines
242 B
Text

// make_unibyte_string (str, strlen (str)) -> build_unibyte_string (str)
@@
identifier I;
@@
- make_unibyte_string (I, strlen (I))
+ build_unibyte_string (I)
@@
constant C;
@@
- make_unibyte_string (C, strlen (C))
+ build_unibyte_string (C)