mirror of
https://github.com/torvalds/linux.git
synced 2026-06-05 13:06:59 +02:00
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> |
||
|---|---|---|
| .. | ||
| Documentation | ||
| plugins | ||
| .gitignore | ||
| Build | ||
| event-parse-api.c | ||
| event-parse-local.h | ||
| event-parse.c | ||
| event-parse.h | ||
| event-plugin.c | ||
| event-utils.h | ||
| kbuffer-parse.c | ||
| kbuffer.h | ||
| libtraceevent.pc.template | ||
| Makefile | ||
| parse-filter.c | ||
| parse-utils.c | ||
| tep_strerror.c | ||
| trace-seq.c | ||
| trace-seq.h | ||