code style
[ppastats.git] / src / lp.c
index f9eca43..f3d0610 100644 (file)
--- a/src/lp.c
+++ b/src/lp.c
@@ -19,6 +19,7 @@
 
 
 #include <stdlib.h>
+#include <stdio.h>
 #include <string.h>
 
 #include "lp.h"
@@ -53,7 +54,8 @@ void distro_series_free(struct distro_series *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);
@@ -68,7 +70,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;
 
@@ -78,12 +81,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;
 
@@ -167,16 +172,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;
-}
-