Skip to content

Commit ecacde0

Browse files
author
Ralph Castain
committed
Purge whitespace errors
Signed-off-by: Ralph Castain <[email protected]>
1 parent 3aa131a commit ecacde0

File tree

3 files changed

+27
-26
lines changed

3 files changed

+27
-26
lines changed

opal/util/cmd_line.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* Copyright (c) 2012-2015 Cisco Systems, Inc. All rights reserved.
1616
* Copyright (c) 2015-2017 Research Organization for Information Science
1717
* and Technology (RIST). All rights reserved.
18-
* Copyright (c) 2016 Intel, Inc. All rights reserved
18+
* Copyright (c) 2016-2017 Intel, Inc. All rights reserved.
1919
* $COPYRIGHT$
2020
*
2121
* Additional copyrights may follow
@@ -402,8 +402,8 @@ int opal_cmd_line_parse(opal_cmd_line_t *cmd, bool ignore_unknown, bool ignore_u
402402
which can have 0 or 1 arguments */
403403
if (i >= cmd->lcl_argc) {
404404
/* If this is a help request, can have no arguments */
405-
if((NULL != option->clo_single_dash_name &&
406-
0 == strcmp(option->clo_single_dash_name, "h")) ||
405+
if((NULL != option->clo_single_dash_name &&
406+
0 == strcmp(option->clo_single_dash_name, "h")) ||
407407
(NULL != option->clo_long_name &&
408408
0 == strcmp(option->clo_long_name, "help"))) {
409409
help_without_arg = true;
@@ -466,7 +466,7 @@ int opal_cmd_line_parse(opal_cmd_line_t *cmd, bool ignore_unknown, bool ignore_u
466466
}
467467

468468
/* If there are no options to this command or it is
469-
a help request with no argument, see if we need to
469+
a help request with no argument, see if we need to
470470
set a boolean value to "true". */
471471

472472
if (0 == option->clo_num_params || help_without_arg) {

opal/util/info.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
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
@@ -338,7 +339,7 @@ int opal_info_get_bool(opal_info_t *info, char *key, bool *value, int *flag)
338339
str[sizeof(str) - 1] = '\0';
339340
opal_info_get(info, key, sizeof(str) - 1, str, flag);
340341
if (*flag) {
341-
*value = opal_str_to_bool(str);
342+
*value = opal_str_to_bool(str);
342343
}
343344

344345
return OPAL_SUCCESS;
@@ -373,7 +374,7 @@ opal_str_to_bool(char *str)
373374
/* RHC unrecognized value -- print a warning? */
374375
}
375376
}
376-
return result;
377+
return result;
377378
}
378379

379380
/*
@@ -587,4 +588,3 @@ opal_info_value_to_bool(char *value, bool *interp)
587588

588589
return OPAL_ERR_BAD_PARAM;
589590
}
590-

opal/util/info_subscriber.c

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
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 {
6162
typedef struct opal_callback_list_item_t opal_callback_list_item_t;
6263

6364
OPAL_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

6970
OPAL_DECLSPEC OBJ_CLASS_DECLARATION(opal_callback_list_item_t);
7071
static 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

7677
static 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

Comments
 (0)