pkg.c (257632) | pkg.c (258126) |
---|---|
1/*- 2 * Copyright (c) 2012-2013 Baptiste Daroussin <bapt@FreeBSD.org> 3 * Copyright (c) 2013 Bryan Drewery <bdrewery@FreeBSD.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2012-2013 Baptiste Daroussin <bapt@FreeBSD.org> 3 * Copyright (c) 2013 Bryan Drewery <bdrewery@FreeBSD.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: stable/10/usr.sbin/pkg/pkg.c 257632 2013-11-04 13:01:29Z bdrewery $"); | 29__FBSDID("$FreeBSD: stable/10/usr.sbin/pkg/pkg.c 258126 2013-11-14 09:26:52Z glebius $"); |
30 31#include <sys/param.h> 32#include <sys/queue.h> 33#include <sys/types.h> 34#include <sys/sbuf.h> 35#include <sys/wait.h> 36 37#define _WITH_GETLINE --- 283 unchanged lines hidden (view full) --- 321 strlcpy(f->hash, fp, sizeof(f->hash)); 322 323 return (f); 324} 325 326static void 327free_fingerprint_list(struct fingerprint_list* list) 328{ | 30 31#include <sys/param.h> 32#include <sys/queue.h> 33#include <sys/types.h> 34#include <sys/sbuf.h> 35#include <sys/wait.h> 36 37#define _WITH_GETLINE --- 283 unchanged lines hidden (view full) --- 321 strlcpy(f->hash, fp, sizeof(f->hash)); 322 323 return (f); 324} 325 326static void 327free_fingerprint_list(struct fingerprint_list* list) 328{ |
329 struct fingerprint* fingerprint; | 329 struct fingerprint *fingerprint, *tmp; |
330 | 330 |
331 STAILQ_FOREACH(fingerprint, list, next) { | 331 STAILQ_FOREACH_SAFE(fingerprint, list, next, tmp) { |
332 if (fingerprint->name) 333 free(fingerprint->name); 334 free(fingerprint); 335 } 336 free(list); 337} 338 339static struct fingerprint * --- 656 unchanged lines hidden --- | 332 if (fingerprint->name) 333 free(fingerprint->name); 334 free(fingerprint); 335 } 336 free(list); 337} 338 339static struct fingerprint * --- 656 unchanged lines hidden --- |