X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=src%2Fcommon%2Fcommon.c;h=048e3d27ce4001ca6a6c443239106b7d6764095c;hp=1a7d57cc2bb420520508336968ef155d6631b6bf;hb=0235b0db7de5bcacdb3650c92461f2ce5eb2143d;hpb=3aa68ad9462c0d154a57b98d0f51880128731781 diff --git a/src/common/common.c b/src/common/common.c index 1a7d57cc..048e3d27 100644 --- a/src/common/common.c +++ b/src/common/common.c @@ -1,25 +1,9 @@ /* - * Babeltrace common functions + * SPDX-License-Identifier: MIT * * Copyright 2016 Philippe Proulx * - * 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. - * - * 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. + * Babeltrace common functions */ #define BT_LOG_OUTPUT_LEVEL log_level @@ -783,7 +767,7 @@ bool bt_common_string_is_printable(const char *input) BT_ASSERT_DBG(input); for (ch = input; *ch != '\0'; ch++) { - if (!isprint(*ch) && *ch != '\n' && *ch != '\r' && + if (!isprint((unsigned char) *ch) && *ch != '\n' && *ch != '\r' && *ch != '\t' && *ch != '\v') { printable = false; goto end;