diff mbox

[5/6] Mention that create_child takes ownership of the allocated name

Message ID 1422559716-5480-5-git-send-email-simon.marchi@ericsson.com
State New
Headers show

Commit Message

Simon Marchi Jan. 29, 2015, 7:28 p.m. UTC
gdb/ChangeLog:

	* varobj.c (create_child): Modify comment.
---
 gdb/varobj.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Joel Brobecker Jan. 30, 2015, 3:35 a.m. UTC | #1
> gdb/ChangeLog:
> 
> 	* varobj.c (create_child): Modify comment.

OK, with one favor if you wouldn't mind.

> ---
>  gdb/varobj.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/gdb/varobj.c b/gdb/varobj.c
> index 0daef91..d3fa1ba 100644
> --- a/gdb/varobj.c
> +++ b/gdb/varobj.c
> @@ -2043,7 +2043,9 @@ uninstall_variable (struct varobj *var)
>  
>  }
>  
> -/* Create and install a child of the parent of the given name.  */
> +/* Create and install a child of the parent of the given name.
> +
> +   The created VAROBJ takes ownership of the allocated NAME.  */
>  static struct varobj *

GDB's Coding Style requires that we have an empty line between
function documentation and function definition. It was missing
here, and since you're touching this area, would you mind adding it?

Thank you!
Simon Marchi Jan. 30, 2015, 8:15 p.m. UTC | #2
On 15-01-29 10:35 PM, Joel Brobecker wrote:
>> gdb/ChangeLog:
>>
>> 	* varobj.c (create_child): Modify comment.
> 
> OK, with one favor if you wouldn't mind.
> 
>> ---
>>  gdb/varobj.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/gdb/varobj.c b/gdb/varobj.c
>> index 0daef91..d3fa1ba 100644
>> --- a/gdb/varobj.c
>> +++ b/gdb/varobj.c
>> @@ -2043,7 +2043,9 @@ uninstall_variable (struct varobj *var)
>>  
>>  }
>>  
>> -/* Create and install a child of the parent of the given name.  */
>> +/* Create and install a child of the parent of the given name.
>> +
>> +   The created VAROBJ takes ownership of the allocated NAME.  */
>>  static struct varobj *
> 
> GDB's Coding Style requires that we have an empty line between
> function documentation and function definition. It was missing
> here, and since you're touching this area, would you mind adding it?
> 
> Thank you!

Thanks, pushed with an extra empty line.
diff mbox

Patch

diff --git a/gdb/varobj.c b/gdb/varobj.c
index 0daef91..d3fa1ba 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -2043,7 +2043,9 @@  uninstall_variable (struct varobj *var)
 
 }
 
-/* Create and install a child of the parent of the given name.  */
+/* Create and install a child of the parent of the given name.
+
+   The created VAROBJ takes ownership of the allocated NAME.  */
 static struct varobj *
 create_child (struct varobj *parent, int index, char *name)
 {