]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cookies: fix typo and expand comment
authorDaniel Gustafsson <daniel@yesql.se>
Thu, 3 Jun 2021 11:02:09 +0000 (13:02 +0200)
committerDaniel Gustafsson <daniel@yesql.se>
Thu, 3 Jun 2021 11:02:09 +0000 (13:02 +0200)
Fix a typo in the sorting comment, and while in there elaborate slightly
on why creationtime can be used as a tiebreaker.

lib/cookie.c

index fde6a84ce62dc9c2bb92c82ecb47d18efa293e43..537658fc6af1b79d222e435e3cee24a5683b05a7 100644 (file)
@@ -1221,7 +1221,8 @@ fail:
  *
  * Helper function to sort cookies such that the longest path gets before the
  * shorter path. Path, domain and name lengths are considered in that order,
- * with tge creationtime as the tiebreaker.
+ * with the creationtime as the tiebreaker. The creationtime is guaranteed to
+ * be unique per cookie, so we know we will get an ordering at that point.
  */
 static int cookie_sort(const void *p1, const void *p2)
 {