[hipl-dev] [Branch ~toxedvirus/hipl/hipfw-modules] Rev 5014: K&R style enforcement.

  • From: noreply@xxxxxxxxxxxxx
  • To: HIPL core team <hipl-dev@xxxxxxxxxxxxx>
  • Date: Mon, 15 Nov 2010 17:26:34 -0000

------------------------------------------------------------
revno: 5014
committer: Andrius Bentkus <andrius.bentkus@xxxxxxxxxxxxxx>
branch nick: hipfw-modules
timestamp: Mon 2010-11-15 18:25:06 +0100
message:
  K&R style enforcement.
modified:
  lib/core/options.c
  lib/core/options.h


--
lp:~toxedvirus/hipl/hipfw-modules
https://code.launchpad.net/~toxedvirus/hipl/hipfw-modules

Your team HIPL core team is subscribed to branch 
lp:~toxedvirus/hipl/hipfw-modules.
To unsubscribe from this branch go to 
https://code.launchpad.net/~toxedvirus/hipl/hipfw-modules/+edit-subscription
=== modified file 'lib/core/options.c'
--- lib/core/options.c  2010-11-15 17:08:02 +0000
+++ lib/core/options.c  2010-11-15 17:25:06 +0000
@@ -278,8 +278,7 @@
         for (i = 0; i < block->size; i++) {
             enum hip_cmd_option_types type = block->options[i].type;
             // double :: for optional, single : for required, only option 'v' 
for standard
-            switch (type)
-            {
+            switch (type) {
             case OPTION_TYPE_OPTIONAL:
             case OPTION_TYPE_REQUIRED:
                 optstring[j+type] = ':';
@@ -317,8 +316,7 @@
 
     while ((ch = getopt(argc, (char **)argv, opts)) != -1) {
         char cch = (char)ch;
-        switch (cch)
-        {
+        switch (cch) {
         case '?':
             // handle not existent argument
             if (list->missing_option != NULL) {

=== modified file 'lib/core/options.h'
--- lib/core/options.h  2010-11-09 13:04:44 +0000
+++ lib/core/options.h  2010-11-15 17:25:06 +0000
@@ -47,8 +47,7 @@
 
 // change the code accordingly in hip_cmd_options_create_string@xxxxxxxxx if 
you touch this
 //                                      hip_cmd_opt_string_size@xxxxxxxxx
-enum hip_cmd_option_types
-{
+enum hip_cmd_option_types {
   OPTION_TYPE_STANDARD = 0,
   OPTION_TYPE_REQUIRED = 1,
   OPTION_TYPE_OPTIONAL = 2
@@ -58,22 +57,19 @@
 typedef void (*hip_cmd_missing_option_handler)(const char option);
 typedef hip_cmd_missing_option_handler hip_cmd_missing_argument_handler;
 
-struct hip_cmd_option
-{
+struct hip_cmd_option {
   enum hip_cmd_option_types type;
   hip_cmd_option_handler handler;
   char short_name;
   char description[OPTION_DESCRIPTION_SIZE];
 };
 
-struct hip_cmd_option_block
-{
+struct hip_cmd_option_block {
   struct hip_cmd_option *options;
   unsigned int size;
 };
 
-struct hip_cmd_option_list
-{
+struct hip_cmd_option_list {
   hip_cmd_missing_option_handler missing_option;
   hip_cmd_missing_argument_handler missing_argument;
   hip_ll_t *linkedlist;

Other related posts: