X-Git-Url: http://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=src%2Flp.c;h=c0c2b905c068c54fdd840a2c54edeffa094cdbe6;hb=33e668c4571e06effe56eaa7dc5884412a2707d2;hp=e927b2e4ef2561b5f5be8e32fa8299c82b92590f;hpb=f2b0384f6231324f53e78aa458b9a46b0e659c43;p=ppastats.git diff --git a/src/lp.c b/src/lp.c index e927b2e..c0c2b90 100644 --- a/src/lp.c +++ b/src/lp.c @@ -1,24 +1,24 @@ /* - Copyright (C) 2011 jeanfi@gmail.com - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA -*/ - + * Copyright (C) 2011-2012 jeanfi@gmail.com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA + */ #include +#include #include #include "lp.h" @@ -47,11 +47,14 @@ void distro_series_free(struct distro_series *d) free(d->version); free(d->title); free(d->displayname); + + free(d); } } void -binary_package_publishing_history_free(struct binary_package_publishing_history *b) +binary_package_publishing_history_free \ +(struct binary_package_publishing_history *b) { if (b) { free(b->binary_package_name); @@ -66,7 +69,8 @@ struct binary_package_publishing_history * binary_package_publishing_history_new(const char *binary_package_name, const char *binary_package_version, const char *distro_arch_series_link, - const char *self_link) + const char *self_link, + int architecture_specific) { struct binary_package_publishing_history *b; @@ -76,12 +80,14 @@ binary_package_publishing_history_new(const char *binary_package_name, b->binary_package_version = strdup(binary_package_version); b->distro_arch_series_link = strdup(distro_arch_series_link); b->self_link = strdup(self_link); + b->architecture_specific = architecture_specific; return b; } void -binary_package_publishing_history_list_free(struct binary_package_publishing_history **list) +binary_package_publishing_history_list_free\ +(struct binary_package_publishing_history **list) { struct binary_package_publishing_history **l_cur = list; @@ -165,16 +171,3 @@ void daily_download_total_list_free(struct daily_download_total **list) } } -int list_length(void **list) -{ - int n; - - n = 0; - while (*list) { - list++; - n++; - } - - return n; -} -