+// SPDX-License-Identifier: GPL-2.0-or-later
+
/***************************************************************************
* Copyright (C) 2018 by Square, Inc. *
* Steven Stallion <stallion@squareup.com> *
- * *
- * 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, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifdef HAVE_CONFIG_H
if (retval != ERROR_OK)
goto fail;
- command_print(cmd, "repeats %" PRId32 " %s", count,
+ command_print(cmd, "repeats %" PRIu32 " %s", count,
(count == 1) ? "time" : "times");
break;
}
return ERROR_OK;
default:
- command_print(cmd, "invalid extended trace ID: %" PRId32, ext_id);
+ command_print(cmd, "invalid extended trace ID: %" PRIu32, ext_id);
return ERROR_FAIL;
}
break;
}
default:
- command_print(cmd, "invalid trace ID: %" PRId32, id);
+ command_print(cmd, "invalid trace ID: %" PRIu32, id);
return ERROR_FAIL;
}
}
size = esirisc_trace_buffer_size(trace_info);
buffer = calloc(1, size);
- if (buffer == NULL) {
+ if (!buffer) {
command_print(cmd, "out of memory");
return ERROR_FAIL;
}
int retval;
buffer = calloc(1, size);
- if (buffer == NULL) {
+ if (!buffer) {
command_print(cmd, "out of memory");
return ERROR_FAIL;
}
size = esirisc_trace_buffer_size(trace_info);
buffer = calloc(1, size);
- if (buffer == NULL) {
+ if (!buffer) {
command_print(cmd, "out of memory");
return ERROR_FAIL;
}
int retval;
buffer = calloc(1, size);
- if (buffer == NULL) {
+ if (!buffer) {
command_print(cmd, "out of memory");
return ERROR_FAIL;
}
command_print(CMD, "trigger delay: %s",
esirisc_trace_delay_strings[trace_info->delay]);
- command_print(CMD, "trigger delay cycles: %i", trace_info->delay_cycles);
+ command_print(CMD, "trigger delay cycles: %" PRIu32, trace_info->delay_cycles);
return ERROR_OK;
}