X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=types%2Farray.c;h=494210827ff80ab301479b6aa4537d49c24684b7;hb=031a946495a7b5139c2ebf24d363299073924d7e;hp=047adac21902c7d7f438fc14a1e55099181280f1;hpb=8673030f3cb8d157a30e79af524fd5cca253025e;p=babeltrace.git diff --git a/types/array.c b/types/array.c index 047adac2..49421082 100644 --- a/types/array.c +++ b/types/array.c @@ -16,6 +16,14 @@ * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ #include @@ -76,8 +84,7 @@ struct declaration_array * array_declaration->elem = elem_declaration; array_declaration->scope = new_declaration_scope(parent_scope); declaration->id = CTF_TYPE_ARRAY; - /* No need to align the array, the first element will align itself */ - declaration->alignment = 1; + declaration->alignment = elem_declaration->alignment; declaration->declaration_free = _array_declaration_free; declaration->definition_new = _array_definition_new; declaration->definition_free = _array_definition_free;