projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix a spelling mistake in the binutils documentation.
[deliverable/binutils-gdb.git]
/
libctf
/
ctf-decl.c
diff --git
a/libctf/ctf-decl.c
b/libctf/ctf-decl.c
index c85982e4a3f16ea93c1f10a02296d16334de4eab..5dcf60ab08bdbac42b3dc459ac89fb48c4fa6905 100644
(file)
--- a/
libctf/ctf-decl.c
+++ b/
libctf/ctf-decl.c
@@
-1,5
+1,5
@@
/* C declarator syntax glue.
/* C declarator syntax glue.
- Copyright (C) 2019 Free Software Foundation, Inc.
+ Copyright (C) 2019
-2020
Free Software Foundation, Inc.
This file is part of libctf.
This file is part of libctf.
@@
-65,7
+65,7
@@
ctf_decl_fini (ctf_decl_t *cd)
for (cdp = ctf_list_next (&cd->cd_nodes[i]); cdp != NULL; cdp = ndp)
{
ndp = ctf_list_next (cdp);
for (cdp = ctf_list_next (&cd->cd_nodes[i]); cdp != NULL; cdp = ndp)
{
ndp = ctf_list_next (cdp);
-
ctf_
free (cdp);
+ free (cdp);
}
}
}
}
}
}
@@
-132,7
+132,7
@@
ctf_decl_push (ctf_decl_t *cd, ctf_file_t *fp, ctf_id_t type)
prec = CTF_PREC_BASE;
}
prec = CTF_PREC_BASE;
}
- if ((cdp =
ctf_
alloc (sizeof (ctf_decl_node_t))) == NULL)
+ if ((cdp =
m
alloc (sizeof (ctf_decl_node_t))) == NULL)
{
cd->cd_err = EAGAIN;
return;
{
cd->cd_err = EAGAIN;
return;
@@
-176,10
+176,14
@@
void ctf_decl_sprintf (ctf_decl_t *cd, const char *format, ...)
va_end (ap);
if (n > 0)
va_end (ap);
if (n > 0)
- cd->cd_buf = ctf_str_append (cd->cd_buf, str);
+ {
+ char *newbuf;
+ if ((newbuf = ctf_str_append (cd->cd_buf, str)) != NULL)
+ cd->cd_buf = newbuf;
+ }
/* Sticky error condition. */
/* Sticky error condition. */
- if (n < 0)
+ if (n < 0
|| cd->cd_buf == NULL
)
{
free (cd->cd_buf);
cd->cd_buf = NULL;
{
free (cd->cd_buf);
cd->cd_buf = NULL;
This page took
0.026448 seconds
and
4
git commands to generate.