[Github-comments] [geany/geany] Use strchr instead of strstr (PR #2962)

Andy Alt notifications at xxxxx
Thu Nov 25 07:33:37 UTC 2021


@andy5995 commented on this pull request.



> @@ -1063,7 +1063,7 @@ gboolean build_parse_make_dir(const gchar *string, gchar **prefix)
 		gchar *input;
 
 		/* get the start of the path */
-		pos = strstr(string, "/");
+		pos = strchr(pos, "/");

```suggestion
		pos = strchr(pos, '/');
```
When using `strchr`, use single quotes around the char (because it's a char and not a string)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/2962#pullrequestreview-815636312
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20211124/93d39dce/attachment-0001.htm>


More information about the Github-comments mailing list