Skip to content
Extraits de code Groupes Projets

Queue download if update asked per ID

Fusionnées Kubat a demandé de fusionner better-filtered-update vers master
2 files
+ 19
13
Comparer les modifications
  • Côte à côte
  • En ligne

Fichiers

+ 18
13
@@ -223,24 +223,29 @@ lkt_uri_free(struct lkt_uri *ret)
struct lkt_uri *
lkt_uri_copy(const struct lkt_uri *src)
{
struct lkt_uri *ret = LKT_ALLOC_STRUCT(lkt_uri);
memset(ret, 0, sizeof(struct lkt_uri));
struct lkt_uri *ret = lkt_uri_new();
/* NULL Check */
if (lkt_uri_get_type(src) == URI_NULL)
return ret;
/* First, shallow copy */
if (src != NULL)
memcpy(ret, src, sizeof(struct lkt_uri));
/* A string was allocated for the URI */
if (!ret->is_int) {
ret->value = (void *)strdup((const void *)src->value);
ret->_allocated = true;
}
/* Second, deep copy */
{
if (!ret->is_int) {
ret->value = (void *)strdup((const void *)src->value);
ret->_allocated = true;
}
/* An integer was allocated for the URI */
else if (ret->_allocated) {
ret->value = LKT_ALLOC(size_t);
*((size_t *)ret->value) = *((size_t *)src->value);
LOG_WARN("URI", "The allocated integer URIs are deprecated, "
"you shouldn't be using them");
else if (ret->_allocated) {
ret->value = LKT_ALLOC(size_t);
*((size_t *)ret->value) = *((size_t *)src->value);
LOG_WARN("URI", "The allocated integer URIs are deprecated, "
"you shouldn't be using them");
}
}
return ret;
Chargement en cours