X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf%2Ftypes%2Finteger.c;h=719823b9ff23675aab3a0f1b787ddeb8f0af25f2;hp=9b918954d269dbb4d04c83f2f4146cec7a5b83f1;hb=64fa3fec6c28f1d077812b4bfa06ae73b0f5999d;hpb=c5e74408f9786219f6b44400dcf2098ab9cc78fb diff --git a/formats/ctf/types/integer.c b/formats/ctf/types/integer.c index 9b918954..719823b9 100644 --- a/formats/ctf/types/integer.c +++ b/formats/ctf/types/integer.c @@ -3,7 +3,9 @@ * * Integers read/write functions. * - * Copyright 2010 - Mathieu Desnoyers + * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation + * + * Author: Mathieu Desnoyers * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -40,11 +42,11 @@ int _aligned_integer_read(struct stream_pos *ppos, int rbo = (integer_declaration->byte_order != BYTE_ORDER); /* reverse byte order */ ctf_align_pos(pos, integer_declaration->p.alignment); - assert(!(pos->offset % CHAR_BIT)); if (!ctf_pos_access_ok(pos, integer_declaration->len)) return -EFAULT; + assert(!(pos->offset % CHAR_BIT)); if (!integer_declaration->signedness) { switch (integer_declaration->len) { case 8: @@ -142,11 +144,11 @@ int _aligned_integer_write(struct stream_pos *ppos, int rbo = (integer_declaration->byte_order != BYTE_ORDER); /* reverse byte order */ ctf_align_pos(pos, integer_declaration->p.alignment); - assert(!(pos->offset % CHAR_BIT)); if (!ctf_pos_access_ok(pos, integer_declaration->len)) return -EFAULT; + assert(!(pos->offset % CHAR_BIT)); if (pos->dummy) goto end; if (!integer_declaration->signedness) {