X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=tools%2Fproftool.c;h=c1803fa78a761b7770af7a031442f1e057c4001d;hb=899455176058d673887a762aa38853188a030af4;hp=a48ed286a5f240de526f4be50bd03463465fdb72;hpb=6c887b2acb1e97509cb4e4ee6aa13a5fb91ac3e8;p=u-boot diff --git a/tools/proftool.c b/tools/proftool.c index a48ed286a5..c1803fa78a 100644 --- a/tools/proftool.c +++ b/tools/proftool.c @@ -1,20 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Copyright (c) 2013 Google, Inc - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA */ /* Decode and dump U-Boot profiling information */ @@ -29,6 +15,7 @@ #include #include #include +#include #include #include @@ -333,7 +320,7 @@ static void check_trace_config_line(struct trace_configline_info *item) if (err == REG_NOMATCH) continue; - if (err != REG_NOERROR) { + if (err) { regex_report_error(&item->regex, err, "match", item->name); break; @@ -444,9 +431,10 @@ static int read_trace_config(FILE *fin) err = regcomp(&line->regex, tok, REG_NOSUB); if (err) { + int r = regex_report_error(&line->regex, err, + "compile", tok); free(line); - return regex_report_error(&line->regex, err, "compile", - tok); + return r; } /* link this new one to the end of the list */