X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;ds=sidebyside;f=formats%2Fctf%2Ftypes%2Fvariant.c;h=fc7b7ad449d935ea4dcf9e32afda839463250141;hb=f3985ab106d89d8e764c1a8dd0c8bda09b755d10;hp=d2ef7714dd8622407ca4a8255ef38168c5e449b8;hpb=64fa3fec6c28f1d077812b4bfa06ae73b0f5999d;p=babeltrace.git diff --git a/formats/ctf/types/variant.c b/formats/ctf/types/variant.c index d2ef7714..fc7b7ad4 100644 --- a/formats/ctf/types/variant.c +++ b/formats/ctf/types/variant.c @@ -16,15 +16,24 @@ * * 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 -int ctf_variant_rw(struct stream_pos *ppos, struct definition *definition) +int ctf_variant_rw(struct bt_stream_pos *ppos, struct bt_definition *definition) { - struct declaration *declaration = definition->declaration; + struct bt_declaration *declaration = definition->declaration; struct ctf_stream_pos *pos = ctf_pos(ppos); - ctf_align_pos(pos, declaration->alignment); - return variant_rw(ppos, definition); + if (!ctf_align_pos(pos, declaration->alignment)) + return -EFAULT; + return bt_variant_rw(ppos, definition); }