diff options
author | Sol Boucher <solb@chromium.org> | 2015-05-05 18:25:18 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-05-08 20:25:03 +0200 |
commit | 1a3349ffd1a8b9e0e656ea9ac889ce71860864c0 (patch) | |
tree | 91e97987b4170ba415f7d390761e0550ce747eac /src | |
parent | 5bad3954bf32f83ffd85dab90797b24103fc994a (diff) |
cbfstool: Simplify the common buffer_splice() function's interface
Previously, this function allowed one to pass a size of 0 in order to
indicate that the entire buffer should be copied. However, the
semantics of calling it this way were non-obvious: The desired
behavior was clear when the offset was also 0, but what was the
expected outcome when the offset was nonzero, since carrying over the
original size in this case would be an error? In fact, it turns out
that it always ignored the provided offset when the size was zero.
This commit eliminates all special handling of 0; thus, the resulting
buffer is exactly as large as requested, even if it's degenerate.
Since the only consumer that actually called the function with a size
of 0 was buffer_clone(), no other files required changes.
Change-Id: I1baa5dbaa7ba5bd746e8b1e08816335183bd5d2d
Signed-off-by: Sol Boucher <solb@chromium.org>
Reviewed-on: http://review.coreboot.org/10132
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src')
0 files changed, 0 insertions, 0 deletions