879e4d2590
Many places in dtc use strdup(), but none of them actually check the return value to see if the implied allocation succeeded. This is a potential bug, which we fix in the patch below by replacing strdup() with an xstrdup() which in analogy to xmalloc() will quit with a fatal error if the allocation fails. I felt the introduciton of util.[ch] was a better choice for utility oriented code than directly using srcpos.c for the new string function. This patch is a re-factoring of Dave Gibson's similar patch. Signed-off-by: Jon Loeliger <jdl@freescale.com>
18 lines
372 B
Makefile
18 lines
372 B
Makefile
# Makefile.dtc
|
|
#
|
|
# This is not a complete Makefile of itself. Instead, it is designed to
|
|
# be easily embeddable into other systems of Makefiles.
|
|
#
|
|
DTC_SRCS = \
|
|
checks.c \
|
|
data.c \
|
|
dtc.c \
|
|
flattree.c \
|
|
fstree.c \
|
|
livetree.c \
|
|
srcpos.c \
|
|
treesource.c \
|
|
util.c
|
|
|
|
DTC_GEN_SRCS = dtc-lexer.lex.c dtc-parser.tab.c
|
|
DTC_OBJS = $(DTC_SRCS:%.c=%.o) $(DTC_GEN_SRCS:%.c=%.o)
|