commit-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Inetutils branch, master, updated. inetutils-1_8-6-g47171e7


From: Alfred M. Szmidt
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_8-6-g47171e7
Date: Sat, 10 Jul 2010 18:13:25 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".

The branch, master has been updated
       via  47171e7355ee9c1dea22316e3865360195685e26 (commit)
      from  d316e8e600df7b8b68f766c4d20529d586babe66 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=47171e7355ee9c1dea22316e3865360195685e26


commit 47171e7355ee9c1dea22316e3865360195685e26
Author: Alfred M. Szmidt <address@hidden>
Date:   Sat Jul 10 20:19:57 2010 +0200

    * ifconfig/options.c (parse_opt_set_default_format): Abort if no
    output format could be found.

diff --git a/ChangeLog b/ChangeLog
index ce8e96a..9c5795e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-07-10  Alfred M. Szmidt  <address@hidden>
+
+       * ifconfig/options.c (parse_opt_set_default_format): Abort if no
+       output format could be found.
+
 2010-07-10  Giuseppe Scrivano  <address@hidden>
 
        * ifconfig/if_index.h (if_indextoname): Remove function declaration.
diff --git a/ifconfig/options.c b/ifconfig/options.c
index 3e3a196..752aa47 100644
--- a/ifconfig/options.c
+++ b/ifconfig/options.c
@@ -376,15 +376,10 @@ parse_opt_set_default_format (const char *format)
     format = system_default_format ? system_default_format : "default";
 
   for (frm = formats; frm->name; frm++)
-    {
-      if (!strcmp (format, frm->name))
-       {
-         default_format = frm->templ;
-         return;
-       }
-    }
-
-  default_format = format;
+    if (!strcmp (format, frm->name)) break;
+  if (frm == NULL || frm->templ == NULL)
+    error (EXIT_FAILURE, 0, "%s: unknown output format", format);
+  default_format = frm->templ;
 }
 
 static int

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog          |    5 +++++
 ifconfig/options.c |   13 ++++---------
 2 files changed, 9 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]