pkg.c (1709ccf9d38a5753192420ce5fccd93b04ce4d07) pkg.c (b04a7a0baf6523245034b8ccd06cd0176b8a18cf)
1/*-
2 * Copyright (c) 2012-2014 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:

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

265 fclose(remote);
266
267 return fd;
268}
269
270static struct fingerprint *
271parse_fingerprint(ucl_object_t *obj)
272{
1/*-
2 * Copyright (c) 2012-2014 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:

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

265 fclose(remote);
266
267 return fd;
268}
269
270static struct fingerprint *
271parse_fingerprint(ucl_object_t *obj)
272{
273 ucl_object_t *cur;
273 const ucl_object_t *cur;
274 ucl_object_iter_t it = NULL;
275 const char *function, *fp, *key;
276 struct fingerprint *f;
277 hash_t fct = HASH_UNKNOWN;
278
279 function = fp = NULL;
280
281 while ((cur = ucl_iterate_object(obj, &it, true))) {

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

344 obj = ucl_parser_get_object(p);
345
346 if (obj->type == UCL_OBJECT)
347 f = parse_fingerprint(obj);
348
349 if (f != NULL)
350 f->name = strdup(filename);
351
274 ucl_object_iter_t it = NULL;
275 const char *function, *fp, *key;
276 struct fingerprint *f;
277 hash_t fct = HASH_UNKNOWN;
278
279 function = fp = NULL;
280
281 while ((cur = ucl_iterate_object(obj, &it, true))) {

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

344 obj = ucl_parser_get_object(p);
345
346 if (obj->type == UCL_OBJECT)
347 f = parse_fingerprint(obj);
348
349 if (f != NULL)
350 f->name = strdup(filename);
351
352 ucl_object_free(obj);
352 ucl_object_unref(obj);
353 ucl_parser_free(p);
354
355 return (f);
356}
357
358static struct fingerprint_list *
359load_fingerprints(const char *path, int *count)
360{

--- 598 unchanged lines hidden ---
353 ucl_parser_free(p);
354
355 return (f);
356}
357
358static struct fingerprint_list *
359load_fingerprints(const char *path, int *count)
360{

--- 598 unchanged lines hidden ---