]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
string-util: fix typo
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 5 Jan 2024 09:59:11 +0000 (18:59 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 5 Jan 2024 10:08:12 +0000 (19:08 +0900)
Follow-up for 63566c6b6ffbb747727db4d6f78c28547430d54f.

src/basic/string-util.c

index 8b039ebd9843dd258ea8454c3d10d56c28a5d1f0..38ca04b8597b873fd4456215027db17ad998b739 100644 (file)
@@ -1512,14 +1512,14 @@ char *strrstr(const char *haystack, const char *needle) {
         const char *f = NULL;
         size_t l;
 
-        /* Like strstr() but returns the last rather than the first occurence of "needle" in "haystack". */
+        /* Like strstr() but returns the last rather than the first occurrence of "needle" in "haystack". */
 
         if (!haystack || !needle)
                 return NULL;
 
         l = strlen(needle);
 
-        /* Special case: for the empty string we return the very last possible occurence, i.e. *after* the
+        /* Special case: for the empty string we return the very last possible occurrence, i.e. *after* the
          * last char, not before. */
         if (l == 0)
                 return strchr(haystack, 0);