X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=src%2Fplugins%2Fctf%2Fcommon%2Fmetadata%2Fdecoder-packetized-file-stream-to-buf.c;h=ac067d2b250b048231997c501e6efd8d031f4a88;hp=e14c54d7907d542d3031795ea97e4633aba0a8ed;hb=0235b0db7de5bcacdb3650c92461f2ce5eb2143d;hpb=6162e6b7a6d907974d954419c2375f654f39eb72 diff --git a/src/plugins/ctf/common/metadata/decoder-packetized-file-stream-to-buf.c b/src/plugins/ctf/common/metadata/decoder-packetized-file-stream-to-buf.c index e14c54d7..ac067d2b 100644 --- a/src/plugins/ctf/common/metadata/decoder-packetized-file-stream-to-buf.c +++ b/src/plugins/ctf/common/metadata/decoder-packetized-file-stream-to-buf.c @@ -1,21 +1,15 @@ /* - * Copyright 2016-2017 - Philippe Proulx + * SPDX-License-Identifier: MIT * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. + * Copyright 2016-2017 Philippe Proulx */ #define BT_COMP_LOG_SELF_COMP self_comp #define BT_LOG_OUTPUT_LEVEL log_level #define BT_LOG_TAG "PLUGIN/CTF/META/DECODER-DECODE-PACKET" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" + +#include "decoder-packetized-file-stream-to-buf.h" #include #include @@ -36,9 +30,6 @@ #define TSDL_MAGIC 0x75d11d57 -extern -int yydebug; - struct ctf_metadata_decoder { struct ctf_visitor_generate_ir *visitor; bt_uuid_t uuid; @@ -212,7 +203,7 @@ int ctf_metadata_decoder_packetized_file_stream_to_buf(FILE *fp, size_t packet_index = 0; out_fp = bt_open_memstream(buf, &size); - if (out_fp == NULL) { + if (!out_fp) { BT_COMP_LOGE("Cannot open memory stream: %s.", strerror(errno)); goto error;