1717 * Copyright (c) 2015 Research Organization for Information Science
1818 * and Technology (RIST). All rights reserved.
1919 * Copyright (c) 2016-2017 IBM Corporation. All rights reserved.
20+ * Copyright (c) 2017 Intel, Inc. All rights reserved.
2021 * $COPYRIGHT$
2122 *
2223 * Additional copyrights may follow
@@ -61,16 +62,16 @@ struct opal_callback_list_item_t {
6162typedef struct opal_callback_list_item_t opal_callback_list_item_t ;
6263
6364OPAL_DECLSPEC OBJ_CLASS_DECLARATION (opal_infosubscriber_t );
64- OBJ_CLASS_INSTANCE (opal_infosubscriber_t ,
65- opal_object_t ,
66- infosubscriber_construct ,
65+ OBJ_CLASS_INSTANCE (opal_infosubscriber_t ,
66+ opal_object_t ,
67+ infosubscriber_construct ,
6768 infosubscriber_destruct );
6869
6970OPAL_DECLSPEC OBJ_CLASS_DECLARATION (opal_callback_list_item_t );
7071static void opal_callback_list_item_destruct (opal_callback_list_item_t * obj );
71- OBJ_CLASS_INSTANCE (opal_callback_list_item_t ,
72- opal_list_item_t ,
73- NULL ,
72+ OBJ_CLASS_INSTANCE (opal_callback_list_item_t ,
73+ opal_list_item_t ,
74+ NULL ,
7475 opal_callback_list_item_destruct );
7576
7677static void infosubscriber_construct (opal_infosubscriber_t * obj ) {
@@ -113,10 +114,10 @@ static char* opal_infosubscribe_inform_subscribers(opal_infosubscriber_t *object
113114
114115 if (found_callback ) { * found_callback = 0 ; }
115116/*
116- * Present the new value to each subscriber. They can decide to accept it, ignore it, or
117+ * Present the new value to each subscriber. They can decide to accept it, ignore it, or
117118 * over-ride it with their own value (like ignore, but they specify what value they want it to have).
118119 *
119- * Since multiple subscribers could set values, only the last setting is kept as the
120+ * Since multiple subscribers could set values, only the last setting is kept as the
120121 * returned value.
121122 */
122123 if (table ) {
@@ -125,7 +126,7 @@ static char* opal_infosubscribe_inform_subscribers(opal_infosubscriber_t *object
125126 if (list ) {
126127 updated_value = new_value ;
127128 OPAL_LIST_FOREACH (item , list , opal_callback_list_item_t ) {
128- updated_value = item -> callback (object , key , updated_value );
129+ updated_value = item -> callback (object , key , updated_value );
129130 if (found_callback ) { * found_callback = 1 ; }
130131 }
131132 }
@@ -186,10 +187,10 @@ opal_infosubscribe_testregister(opal_infosubscriber_t *object)
186187 strlen (testing_keys [i ]), (void * * ) & list );
187188 if (list ) {
188189 OPAL_LIST_FOREACH (item , list , opal_callback_list_item_t ) {
189- if (0 ==
190+ if (0 ==
190191 strcmp (item -> default_value , testing_initialvals [i ])
191192 &&
192- item -> callback == testing_callbacks [i ])
193+ item -> callback == testing_callbacks [i ])
193194 {
194195 found = 1 ;
195196 }
@@ -234,7 +235,7 @@ opal_infosubscribe_testregister(opal_infosubscriber_t *object)
234235 "in hash table\n" );
235236 exit (-1 );
236237 }
237-
238+
238239 err = opal_hash_table_get_next_key_ptr (table ,
239240 (void * * ) & next_key , & key_size , (void * * ) & list , node , & node );
240241 }
@@ -294,13 +295,13 @@ opal_infosubscribe_change_info(opal_infosubscriber_t *object, opal_info_t *new_i
294295 if (!object -> s_info ) {
295296 object -> s_info = OBJ_NEW (opal_info_t );
296297 }
297-
298+
298299 if (NULL != new_info ) {
299300 OPAL_LIST_FOREACH (iterator , & new_info -> super , opal_info_entry_t ) {
300-
301+
301302 updated_value = opal_infosubscribe_inform_subscribers (object , iterator -> ie_key , iterator -> ie_value , & found_callback );
302303 if (updated_value ) {
303- err = opal_info_set (object -> s_info , iterator -> ie_key , updated_value );
304+ err = opal_info_set (object -> s_info , iterator -> ie_key , updated_value );
304305 } else {
305306// This path would happen if there was no callback for this key,
306307// or if there was a callback and it returned null. One way the
@@ -355,15 +356,15 @@ int opal_infosubscribe_subscribe(opal_infosubscriber_t *object, char *key, char
355356 opal_hash_table_set_value_ptr (table , key , strlen (key ), list );
356357 }
357358
358- callback_list_item = OBJ_NEW (opal_callback_list_item_t );
359+ callback_list_item = OBJ_NEW (opal_callback_list_item_t );
359360 callback_list_item -> callback = callback ;
360- if (value ) {
361+ if (value ) {
361362 callback_list_item -> default_value = strdup (value );
362363 } else {
363364 callback_list_item -> default_value = NULL ;
364365 }
365366
366- opal_list_append (list , (opal_list_item_t * ) callback_list_item );
367+ opal_list_append (list , (opal_list_item_t * ) callback_list_item );
367368
368369// Trigger callback() on either the default value or the info that's in the
369370// object if there is one. Unfortunately there's some code duplication as
@@ -412,7 +413,7 @@ int opal_infosubscribe_subscribe(opal_infosubscriber_t *object, char *key, char
412413 } else {
413414/*
414415 * TODO: This should not happen
415- */
416+ */
416417 }
417418
418419 return OPAL_SUCCESS ;
0 commit comments