<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<div class="moz-forward-container"><br>
<br>
-------- Forwarded Message --------
<table class="moz-email-headers-table" cellpadding="0"
cellspacing="0" border="0">
<tbody>
<tr>
<th nowrap="nowrap" valign="BASELINE" align="RIGHT">Subject:
</th>
<td>[PATCH] layout_struct must not call align if alignment
set by type_alignof equals 0</td>
</tr>
<tr>
<th nowrap="nowrap" valign="BASELINE" align="RIGHT">Date: </th>
<td>Wed, 23 Mar 2016 15:40:50 +0100</td>
</tr>
<tr>
<th nowrap="nowrap" valign="BASELINE" align="RIGHT">From: </th>
<td>Thierry Fauck <a class="moz-txt-link-rfc2396E" href="mailto:thierry.fauck@fr.ibm.com"><thierry.fauck@fr.ibm.com></a></td>
</tr>
<tr>
<th nowrap="nowrap" valign="BASELINE" align="RIGHT">To: </th>
<td><a class="moz-txt-link-abbreviated" href="mailto:ltrace-devel@lists.alioth.debian.org">ltrace-devel@lists.alioth.debian.org</a></td>
</tr>
<tr>
<th nowrap="nowrap" valign="BASELINE" align="RIGHT">CC: </th>
<td>Thierry Fauck <a class="moz-txt-link-rfc2396E" href="mailto:tfauck@free.fr"><tfauck@free.fr></a></td>
</tr>
</tbody>
</table>
<br>
<br>
<pre>From: Thierry Fauck <a class="moz-txt-link-rfc2396E" href="mailto:tfauck@free.fr"><tfauck@free.fr></a>
modified: type.c
Signed-off-by: Thierry Fauck <a class="moz-txt-link-rfc2396E" href="mailto:tfauck@free.fr"><tfauck@free.fr></a>
---
type.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/type.c b/type.c
index 0db94f3..db042db 100644
--- a/type.c
+++ b/type.c
@@ -152,6 +152,8 @@ layout_struct(struct process *proc, struct arg_type_info *info,
size_t alignment = type_alignof(proc, field->info);
if (alignment == (size_t)-1)
return -1;
+ else if (alignment == (size_t)0)
+ return 0;
/* Add padding to SZ to align the next element. */
sz = align(sz, alignment);
--
2.7.0
</pre>
<br>
</div>
<br>
</body>
</html>