Audit strstr() calls to see which should be find_str_at_start_of_line().
Related to #40226 (closed) -- we sometimes have a string that we want to find at the start of a line only, but instead we look for it with strstr()
. That's not right: if you just do strstr(s, "target")
then you'll match a line like prefixed-target ...
. But if you do strstr(s, "\n target")
then you'll miss target
at the start of a file.
We should go through our uses of strstr() and see which of them, if any, should be modified to use find_str_at_start_of_line().