Re: [PATCH v6 18/19] fsck: git receive-pack: support excluding objects from fsck'ing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Schindelin <johannes.schindelin@xxxxxx> writes:

> There is a problem, though: `git_config_pathname()` accepts a
> `const char **` parameter to set the path, yet I need to `free()`
> that pointer afterwards because it has been obtained through
> `expand_user_path()` which detaches that buffer from a `strbuf`.

"I have 'const char *' because I do not ever change the string
myself after getting it from an API function, but free() does not
want to free a const pointer" occurs sometimes in our codebase and
it is OK to cast the constness away (many callsites to free()
already do so).
--
To unsubscribe from this list: send the line "unsubscribe git" in



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]