Re: [PATCH v2 3/9] mv: free the *with_slash in check_dir_in_index()
- From
Shaoxuan Yuan <shaoxuan.yuan02@gmail.com>
- Date
- Aug 9, 2022, 02:33 UTC
- Message-ID
- <1c8cbb48-cf62-8105-6ef9-19e9eabf1b80@gmail.com>
- In-Reply-To
- <69039db2-e7b2-f006-63da-e699d302c8ce@github.com>
On 8/9/2022 7:41 AM, Victoria Dye wrote:
Show 7 quoted lines
> Shaoxuan Yuan wrote: >> *with_slash may be a malloc'd pointer, and when it is, free it. > Super-nit: technically, `with_slash` (no `*`) is how you'd refer to the > pointer. `*` is the dereference operator [1], so `*with_slash` has type > `const char` and refers to the first character in the `with_slash` string. > > [1] https://en.wikipedia.org/wiki/Dereference_operator
Oh! Thanks, I was completely unaware. Will fix.
-- Thanks, Shaoxuan