replace open-coded variants of get_record().
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
*/
static void write_trailer(void)
{
*/
static void write_trailer(void)
{
- memset(block + offset, 0, RECORDSIZE);
- offset += RECORDSIZE;
- memset(block + offset, 0, RECORDSIZE);
- offset += RECORDSIZE;
write_if_needed();
if (offset) {
write_if_needed();
if (offset) {
- memset(block + offset, 0, BLOCKSIZE - offset);
- reliable_write(block, BLOCKSIZE);
- offset = 0;
+ get_record();
+ write_if_needed();