diff options
author | Bill Meier <wmeier@newsguy.com> | 2014-02-25 15:42:35 -0500 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2014-02-25 20:46:49 +0000 |
commit | 11b5c15fdb815a2af400bfddef944dbac41a434a (patch) | |
tree | e7217ebcff4d4d9f7f95d0342b6776547e5537c3 /epan/ex-opt.c | |
parent | c55c57ad72acda8cbce2841bc237f966bad5ae5b (diff) |
Remove trailing whitespace
Change-Id: I8116f63ff88687c8db3fd6e8e23b22ab2f759af0
Reviewed-on: https://code.wireshark.org/review/385
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
Diffstat (limited to 'epan/ex-opt.c')
-rw-r--r-- | epan/ex-opt.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/epan/ex-opt.c b/epan/ex-opt.c index 9922078432..ec9dd9dc41 100644 --- a/epan/ex-opt.c +++ b/epan/ex-opt.c @@ -1,6 +1,6 @@ /* * ex-opt.c - * + * * Extension command line options * * (c) 2006, Luis E. Garcia Ontanon <luis@ontanon.org> @@ -23,7 +23,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "config.h" @@ -35,15 +35,15 @@ static GHashTable* ex_opts = NULL; gboolean ex_opt_add(const gchar* optarg) { gchar** splitted; - - if (!ex_opts) + + if (!ex_opts) ex_opts = g_hash_table_new(g_str_hash,g_str_equal); - + splitted = g_strsplit(optarg,":",2); - + if (splitted[0] && splitted[1]) { GPtrArray* this_opts = (GPtrArray *)g_hash_table_lookup(ex_opts,splitted[0]); - + if (this_opts) { g_ptr_array_add(this_opts,splitted[1]); g_free(splitted[0]); @@ -52,9 +52,9 @@ gboolean ex_opt_add(const gchar* optarg) { g_ptr_array_add(this_opts,splitted[1]); g_hash_table_insert(ex_opts,splitted[0],this_opts); } - + g_free(splitted); - + return TRUE; } else { g_strfreev(splitted); @@ -64,12 +64,12 @@ gboolean ex_opt_add(const gchar* optarg) { gint ex_opt_count(const gchar* key) { GPtrArray* this_opts; - + if (! ex_opts) return 0; - + this_opts = (GPtrArray *)g_hash_table_lookup(ex_opts,key); - + if (this_opts) { return this_opts->len; } else { @@ -79,12 +79,12 @@ gint ex_opt_count(const gchar* key) { const gchar* ex_opt_get_nth(const gchar* key, guint index) { GPtrArray* this_opts; - + if (! ex_opts) return 0; - + this_opts = (GPtrArray *)g_hash_table_lookup(ex_opts,key); - + if (this_opts) { if (this_opts->len > index) { return (const gchar *)g_ptr_array_index(this_opts,index); @@ -95,21 +95,21 @@ const gchar* ex_opt_get_nth(const gchar* key, guint index) { } else { return NULL; } - + } extern const gchar* ex_opt_get_next(const gchar* key) { GPtrArray* this_opts; - + if (! ex_opts) return 0; - + this_opts = (GPtrArray *)g_hash_table_lookup(ex_opts,key); - + if (this_opts) { if (this_opts->len) return (const gchar *)g_ptr_array_remove_index(this_opts,0); - else + else return NULL; } else { return NULL; |