[PATCH v8] C++ify gdb/common/environ.c
Sergio Durigan Junior
sergiodj@redhat.com
Tue Jun 20 13:00:00 GMT 2017
On Tuesday, June 20 2017, Simon Marchi wrote:
> On 2017-06-20 05:27, Sergio Durigan Junior wrote:
>> +/* Create a gdb_environ object using the host's environment
>> + variables. */
>
> This comment (about from_host_environ) should probably go in the
> header file, with a /* See common/environ.h. */ here.
Fixed.
>> + /* Return the value in the environment for the variable VAR. The
>> + return pointer is only valid as long as VAR is not
>
> return -> returned?
Fixed.
>> + removed/replaced from the environment. */
>
> What if another variable is set and it causes reallocation of the
> vector? We could be safe and say "as long as the gdb_environ object
> is not modified".
Fixed.
> Otherwise, LGTM.
Thanks to both of you for the valuable comments.
Pushed.
9a6c7d9c021cfeb290d76584db7a01e57e7c3d4e
--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/
More information about the Gdb-patches
mailing list