Parcourir la source

dpkg-deb: Move setcompresstype() before cmdinfos

This unifies the style with the rest of the code base, and avoids the
need for a declaration of a static function.
Guillem Jover il y a 15 ans
Parent
commit
f5d6106db5
1 fichiers modifiés avec 8 ajouts et 8 suppressions
  1. 8 8
      dpkg-deb/main.c

+ 8 - 8
dpkg-deb/main.c

@@ -135,8 +135,6 @@ int debugflag=0, nocheckflag=0, oldformatflag=BUILDOLDPKGFORMAT;
 struct compressor *compressor = &compressor_gzip;
 int compress_level = -1;
 
-static void setcompresstype(const struct cmdinfo *cip, const char *value);
-
 static void
 set_compress_level(const struct cmdinfo *cip, const char *value)
 {
@@ -153,6 +151,14 @@ set_compress_level(const struct cmdinfo *cip, const char *value)
   compress_level = level;
 }
 
+static void
+setcompresstype(const struct cmdinfo *cip, const char *value)
+{
+  compressor = compressor_find_by_name(value);
+  if (compressor == NULL)
+    ohshit(_("unknown compression type `%s'!"), value);
+}
+
 static const struct cmdinfo cmdinfos[]= {
   ACTION("build",         'b', 0, do_build),
   ACTION("contents",      'c', 0, do_contents),
@@ -176,12 +182,6 @@ static const struct cmdinfo cmdinfos[]= {
   {  NULL,           0,   0, NULL,           NULL,         NULL             }
 };
 
-static void setcompresstype(const struct cmdinfo *cip, const char *value) {
-  compressor = compressor_find_by_name(value);
-  if (compressor == NULL)
-    ohshit(_("unknown compression type `%s'!"), value);
-}
-
 int main(int argc, const char *const *argv) {
   dofunction *action;