Deleted Added
full compact
archive_write_set_format_cpio_newc.c (311041) archive_write_set_format_cpio_newc.c (344673)
1/*-
2 * Copyright (c) 2003-2007 Tim Kientzle
3 * Copyright (c) 2006 Rudolf Marek SYSGO s.r.o.
4 * Copyright (c) 2011-2012 Michihiro NAKAJIMA
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 12 unchanged lines hidden (view full) ---

21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28#include "archive_platform.h"
1/*-
2 * Copyright (c) 2003-2007 Tim Kientzle
3 * Copyright (c) 2006 Rudolf Marek SYSGO s.r.o.
4 * Copyright (c) 2011-2012 Michihiro NAKAJIMA
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 12 unchanged lines hidden (view full) ---

21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28#include "archive_platform.h"
29__FBSDID("$FreeBSD: stable/11/contrib/libarchive/libarchive/archive_write_set_format_cpio_newc.c 311041 2017-01-02 01:41:31Z mm $");
29__FBSDID("$FreeBSD: stable/11/contrib/libarchive/libarchive/archive_write_set_format_cpio_newc.c 344673 2019-02-28 22:56:15Z mm $");
30
31#ifdef HAVE_ERRNO_H
32#include <errno.h>
33#endif
34#include <stdio.h>
35#ifdef HAVE_STDLIB_H
36#include <stdlib.h>
37#endif

--- 323 unchanged lines hidden (view full) ---

361 pad = PAD4(strlen(p));
362 ret = __archive_write_output(a, "\0\0\0", pad);
363 if (ret != ARCHIVE_OK) {
364 ret_final = ARCHIVE_FATAL;
365 goto exit_write_header;
366 }
367 }
368exit_write_header:
30
31#ifdef HAVE_ERRNO_H
32#include <errno.h>
33#endif
34#include <stdio.h>
35#ifdef HAVE_STDLIB_H
36#include <stdlib.h>
37#endif

--- 323 unchanged lines hidden (view full) ---

361 pad = PAD4(strlen(p));
362 ret = __archive_write_output(a, "\0\0\0", pad);
363 if (ret != ARCHIVE_OK) {
364 ret_final = ARCHIVE_FATAL;
365 goto exit_write_header;
366 }
367 }
368exit_write_header:
369 if (entry_main)
370 archive_entry_free(entry_main);
369 archive_entry_free(entry_main);
371 return (ret_final);
372}
373
374static ssize_t
375archive_write_newc_data(struct archive_write *a, const void *buff, size_t s)
376{
377 struct cpio *cpio;
378 int ret;

--- 79 unchanged lines hidden ---
370 return (ret_final);
371}
372
373static ssize_t
374archive_write_newc_data(struct archive_write *a, const void *buff, size_t s)
375{
376 struct cpio *cpio;
377 int ret;

--- 79 unchanged lines hidden ---