summaryrefslogtreecommitdiff
path: root/tools/gpio
diff options
context:
space:
mode:
authorHe Zhe <zhe.he@windriver.com>2020-02-20 09:58:50 +0800
committerArnaldo Carvalho de Melo <acme@redhat.com>2020-04-18 09:05:00 -0300
commitf8ff18be1f5c6ba1c2befb043bea6e7eaf9f8987 (patch)
treeb31525929f466d4065a7e4628af5411d39be37aa /tools/gpio
parentbec49a9e05db3dbdca696fa07c62c52638fb6371 (diff)
tools lib traceevent: Take care of return value of asprintf
According to the API, if memory allocation wasn't possible, or some other error occurs, asprintf will return -1, and the contents of strp below are undefined. int asprintf(char **strp, const char *fmt, ...); This patch takes care of return value of asprintf to make it less error prone and prevent the following build warning. ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result] Signed-off-by: He Zhe <zhe.he@windriver.com> Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Cc: Tzvetomir Stoyanov <tstoyanov@vmware.com> Cc: hewenliang4@huawei.com Link: http://lore.kernel.org/lkml/1582163930-233692-1-git-send-email-zhe.he@windriver.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/gpio')
0 files changed, 0 insertions, 0 deletions