mirror of https://gitee.com/openkylin/libvirt.git
docs: hacking: add missing code element
Wrap the 'g_renew()' call for VIR_SHRINK_N in <code>. Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
3666d7ac69
commit
26791f39c0
|
@ -1056,7 +1056,7 @@ BAD:
|
|||
<td>the newly added memory is not zeroed</td></tr>
|
||||
<tr><td><code>VIR_EXPAND_N</code></td><td><code>g_renew(var_t, ptr, n)</code></td>
|
||||
<td>zero the new memory manually or use an array type</td></tr>
|
||||
<tr><td><code>VIR_SHRINK_N</code></td><td>g_renew(var_t, ptr, n)</td>
|
||||
<tr><td><code>VIR_SHRINK_N</code></td><td><code>g_renew(var_t, ptr, n)</code></td>
|
||||
<td></td></tr>
|
||||
<tr><td><code>VIR_APPEND_ELEMENT</code></td><td><code>g_array_append_val</code></td>
|
||||
<td><code>g_ptr_array_add</code> or <code>g_byte_array_append</code></td></tr>
|
||||
|
|
Loading…
Reference in New Issue