[openib-general] [PATCH TRIVIAL] opensm: make osm object local

Sasha Khapyorsky sashak at voltaire.com
Wed Jan 17 16:44:36 PST 2007


This defines osm object as local variable.

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
 osm/opensm/main.c |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)

diff --git a/osm/opensm/main.c b/osm/opensm/main.c
index ff517eb..919f71d 100644
--- a/osm/opensm/main.c
+++ b/osm/opensm/main.c
@@ -57,17 +57,6 @@
 #include <opensm/osm_opensm.h>
 #include <opensm/osm_console.h>
 
-/********************************************************************
-       D E F I N E    G L O B A L    V A R I A B L E S
-*********************************************************************/
-/*
-  This is the global opensm object.
-  One opensm object is required per subnet.
-  Future versions could support multiple subnets by
-  instantiating more than one opensm object.
-*/
-osm_opensm_t osm;
-
 volatile unsigned int osm_exit_flag = 0;
 
 static volatile unsigned int osm_hup_flag = 0;
@@ -545,6 +534,7 @@ main(
   int                   argc,
   char*                 argv[] )
 {
+  osm_opensm_t          osm;
   osm_subn_opt_t        opt;
   ib_net64_t            sm_key = 0;
   ib_api_status_t       status;
-- 
1.5.0.rc0.g2484-dirty





More information about the general mailing list