]> err.no Git - dpkg/commitdiff
Define several private functions and variables as static
authorGuillem Jover <guillem@debian.org>
Thu, 29 Nov 2007 02:17:58 +0000 (04:17 +0200)
committerGuillem Jover <guillem@debian.org>
Thu, 29 Nov 2007 03:57:21 +0000 (05:57 +0200)
ChangeLog
debian/changelog
dpkg-deb/build.c
lib/dbmodify.c
lib/fields.c
lib/tarfn.c
src/packages.c
utils/start-stop-daemon.c

index a6f5935d98c41c123651590774fa83bac978e6dd..e0f3c53dcbb034b30ac91ce059423bab08f63531 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2007-11-29  Guillem Jover  <guillem@debian.org>
+
+       * dpkg-deb/build.c (arbitrary_fields): Define as static.
+       * lib/dbmodify.c (fnis): Likewise.
+       * lib/fields.c (conffvalue_lastword): Likewise.
+       * lib/tarfn.c (StoC): Likewise.
+       * src/packages.c (breaks_check_target): Likewise.
+       * utils/start-stop-daemon.c (siglist): Likewise.
+
 2007-11-28  Raphael Hertzog  <hertzog@debian.org>
 
        * scripts/dpkg-gensymbols.pl: The environment variable
index b7036b790aca0de2077a8e1312c9c7e47241424e..89e97d1536920520367ef15fccac464081a97349 100644 (file)
@@ -14,6 +14,9 @@ dpkg (1.14.12) UNRELEASED; urgency=low
   * The environment variable DPKG_GENSYMBOLS_CHECK_LEVEL can be used to force
     dpkg-gensymbols to use a precise level of checks. Closes: #452022
 
+  [ Guillem Jover ]
+  * Define several private functions and variables as static.
+
  -- Guillem Jover <guillem@debian.org>  Sat, 24 Nov 2007 07:38:13 +0200
 
 dpkg (1.14.11) unstable; urgency=low
index da1dd68ebca295c0dc5a6f33a2ccd0b6c979df26..4c7003645a3a47f484bdf642fb42518f36721040 100644 (file)
@@ -56,7 +56,7 @@ struct _finfo {
   struct _finfo* next;
 };
 
-const char *arbitrary_fields[]= {
+static const char *arbitrary_fields[] = {
   "Package-Type",
   "Subarchitecture",
   "Kernel-Version",
index 4a41066133e0d81b5901671fb521315596b938fb..d13cc10f4d02ff037d174499300fac67db01a743 100644 (file)
@@ -122,7 +122,10 @@ static void createimptmp(void) {
   onerr_abort--;
 }
 
-const struct fni { const char *suffix; char **store; } fnis[]= {
+static const struct fni {
+  const char *suffix;
+  char **store;
+} fnis[] = {
   {   STATUSFILE,                 &statusfile         },
   {   AVAILFILE,                  &availablefile      },
   {   UPDATESDIR IMPORTANTTMP,    &importanttmpfile   },
index aa01b27799e3d6e73b781d0d04254f060108e792..b5dfae75cac99d8fc50dd4c832f47fbd942d38dd 100644 (file)
@@ -224,12 +224,13 @@ void f_configversion(struct pkginfo *pigp, struct pkginfoperfile *pifp,
                      "in Config-Version string `%.250s': %.250s"),value,emsg);
 }
 
-void conffvalue_lastword(const char *value, const char *from,
-                        const char *endent,
-                        const char **word_start_r, int *word_len_r,
-                        const char **new_from_r,
-                        const char *filename, int lno,
-                        FILE *warnto, int *warncount, struct pkginfo *pigp) {
+static void conffvalue_lastword(const char *value, const char *from,
+                                const char *endent,
+                                const char **word_start_r, int *word_len_r,
+                                const char **new_from_r,
+                                const char *filename, int lno, FILE *warnto,
+                                int *warncount, struct pkginfo *pigp)
+{
   /* the code in f_conffiles ensures that value[-1]==' ', which is helpful */
   const char *lastspc;
   
index 2112b60d836eb863b485cf837bf39e80c3e2e771..68901d88cc8f968397e5cb5e4fd82e4f109643fc 100644 (file)
@@ -54,7 +54,7 @@ OtoL(const char * s, int size)
 }
 
 /* String block to C null-terminated string */
-char *
+static char *
 StoC(const char *s, int size)
 {
        int     len;
index 467a6d48836de43ae2d279b118736f8317914151..a88d81b43a2e6369bf9d22059dc3e03eb3d4e714 100644 (file)
@@ -381,10 +381,10 @@ static void breaks_check_one(struct varbuf *aemsgs, int *ok,
   *ok= 0;
 }
 
-void breaks_check_target(struct varbuf *aemsgs, int *ok,
-                         struct pkginfo *broken,
-                         struct pkginfo *target,
-                         struct pkginfo *virtbroken) {
+static void breaks_check_target(struct varbuf *aemsgs, int *ok,
+                                struct pkginfo *broken,
+                                struct pkginfo *target,
+                                struct pkginfo *virtbroken) {
   struct deppossi *possi;
 
   for (possi= target->installed.depended; possi; possi= possi->nextrev) {
index be4885c5a7942d15b9f80877eabc25b66f47fe45..a1ef749065f57d0b0ec36d822fe0dcc1891a5e36 100644 (file)
@@ -371,7 +371,7 @@ struct sigpair {
        int signal;
 };
 
-const struct sigpair siglist[] = {
+static const struct sigpair siglist[] = {
        { "ABRT",       SIGABRT },
        { "ALRM",       SIGALRM },
        { "FPE",        SIGFPE  },