[libc-commits] [PATCH] D119403: Introduce getenv to LLVM libc

Jeff Bailey via Phabricator via libc-commits libc-commits at lists.llvm.org
Sat Feb 12 08:09:14 PST 2022


jeffbailey added inline comments.


================
Comment at: libc/src/stdlib/getenv.cpp:32
+
+    // Check for PATH=, vs PATH1=, PATH2=, etc...
+    if (cur[env_var_name.size()] != '=')
----------------
sivachandra wrote:
> Nit: I didn't understand this comment.
This comment was my reminder to myself that starts_with could match stems as well as entire variables and that I needed to make sure that the equals sign came next.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119403/new/

https://reviews.llvm.org/D119403



More information about the libc-commits mailing list