* [PATCH 1/1] Consistently use xrealloc instead of realloc
@ 2014-03-02 20:39 xypron.glpk-Mmb7MZpHnFY
2014-03-02 23:41 ` David Gibson
0 siblings, 1 reply; 4+ messages in thread
From: xypron.glpk-Mmb7MZpHnFY @ 2014-03-02 20:39 UTC (permalink / raw)
To: grant.likely-QSEj5FYQhm4dnm+yROfE0A,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
devicetree-compiler-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Heinrich Schuchardt
From: Heinrich Schuchardt <xypron.glpk-Mmb7MZpHnFY@public.gmane.org>
fdtput.c:
Replace the remaining call to realloc by xrealloc.
Some redundant lines in encode_value can be saved.
Signed-off-by: Heinrich Schuchardt <xypron.glpk-Mmb7MZpHnFY@public.gmane.org>
---
fdtput.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/fdtput.c b/fdtput.c
index 5226a4e..2a8d674 100644
--- a/fdtput.c
+++ b/fdtput.c
@@ -96,12 +96,7 @@ static int encode_value(struct display_info *disp, char **arg, int arg_count,
/* enlarge our value buffer by a suitable margin if needed */
if (upto + len > value_size) {
value_size = (upto + len) + 500;
- value = realloc(value, value_size);
- if (!value) {
- fprintf(stderr, "Out of mmory: cannot alloc "
- "%d bytes\n", value_size);
- return -1;
- }
+ value = xrealloc(value, value_size);
}
ptr = value + upto;
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe devicetree-compiler" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] Consistently use xrealloc instead of realloc
2014-03-02 20:39 [PATCH 1/1] Consistently use xrealloc instead of realloc xypron.glpk-Mmb7MZpHnFY
@ 2014-03-02 23:41 ` David Gibson
2014-03-03 0:00 ` Heinrich Schuchardt
0 siblings, 1 reply; 4+ messages in thread
From: David Gibson @ 2014-03-02 23:41 UTC (permalink / raw)
To: xypron.glpk
Cc: grant.likely, robh+dt, devicetree, devicetree-compiler,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 638 bytes --]
On Sun, Mar 02, 2014 at 09:39:01PM +0100, xypron.glpk@gmx.de wrote:
> From: Heinrich Schuchardt <xypron.glpk@gmx.de>
>
> fdtput.c:
> Replace the remaining call to realloc by xrealloc.
> Some redundant lines in encode_value can be saved.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Applied, thanks.
Note that in general dtc patches should be CCed to myself and Jon
Loeliger <jdl@jdl.com>, the dtc maintainers.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] Consistently use xrealloc instead of realloc
2014-03-02 23:41 ` David Gibson
@ 2014-03-03 0:00 ` Heinrich Schuchardt
2014-03-03 0:08 ` David Gibson
0 siblings, 1 reply; 4+ messages in thread
From: Heinrich Schuchardt @ 2014-03-03 0:00 UTC (permalink / raw)
To: David Gibson
Cc: grant.likely, robh+dt, devicetree, jdl, devicetree-compiler,
linux-kernel
> Note that in general dtc patches should be CCed to myself and Jon
> Loeliger <jdl@jdl.com>, the dtc maintainers.
>
This is the relevant section in file MAINTAINERS of Torvald's git.
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/MAINTAINERS
OPEN FIRMWARE AND FLATTENED DEVICE TREE
M: Grant Likely <grant.likely@linaro.org>
M: Rob Herring <robh+dt@kernel.org>
L: devicetree@vger.kernel.org
W: http://fdt.secretlab.ca
T: git git://git.secretlab.ca/git/linux-2.6.git
S: Maintained
F: drivers/of/
F: include/linux/of*.h
F: scripts/dtc/
K: of_get_property
K: of_match_table
If the information is not accurate, please, have it updated.
Best regards
Heinrich Schuchardt
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] Consistently use xrealloc instead of realloc
2014-03-03 0:00 ` Heinrich Schuchardt
@ 2014-03-03 0:08 ` David Gibson
0 siblings, 0 replies; 4+ messages in thread
From: David Gibson @ 2014-03-03 0:08 UTC (permalink / raw)
To: Heinrich Schuchardt
Cc: grant.likely, robh+dt, devicetree, jdl, devicetree-compiler,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1130 bytes --]
On Mon, Mar 03, 2014 at 01:00:22AM +0100, Heinrich Schuchardt wrote:
> >Note that in general dtc patches should be CCed to myself and Jon
> >Loeliger <jdl@jdl.com>, the dtc maintainers.
> >
>
> This is the relevant section in file MAINTAINERS of Torvald's git.
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/MAINTAINERS
>
> OPEN FIRMWARE AND FLATTENED DEVICE TREE
> M: Grant Likely <grant.likely@linaro.org>
> M: Rob Herring <robh+dt@kernel.org>
> L: devicetree@vger.kernel.org
> W: http://fdt.secretlab.ca
> T: git git://git.secretlab.ca/git/linux-2.6.git
> S: Maintained
> F: drivers/of/
> F: include/linux/of*.h
> F: scripts/dtc/
> K: of_get_property
> K: of_match_table
>
> If the information is not accurate, please, have it updated.
That's the maintainers information for the devicetree stuff included
in the Linux kernel tree, not for dtc as an upstream project.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-03-03 0:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-02 20:39 [PATCH 1/1] Consistently use xrealloc instead of realloc xypron.glpk-Mmb7MZpHnFY
2014-03-02 23:41 ` David Gibson
2014-03-03 0:00 ` Heinrich Schuchardt
2014-03-03 0:08 ` David Gibson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).