projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Standardize `!ptr` i/o `ptr == NULL`, `ptr` i/o `ptr != NULL`
[babeltrace.git]
/
src
/
cli
/
babeltrace2-cfg-cli-params-arg.c
diff --git
a/src/cli/babeltrace2-cfg-cli-params-arg.c
b/src/cli/babeltrace2-cfg-cli-params-arg.c
index 71c188bff0761b36d0d0914cc2ebff3c74faf8d0..b13172d0e7d9ae153bbc68d85651b5eec9e76e59 100644
(file)
--- a/
src/cli/babeltrace2-cfg-cli-params-arg.c
+++ b/
src/cli/babeltrace2-cfg-cli-params-arg.c
@@
-87,7
+87,7
@@
void ini_append_error_expecting(struct ini_parsing_state *state,
g_string_append_printf(state->ini_error, "Expecting %s:\n", expecting);
/* Only append error if there's one line */
g_string_append_printf(state->ini_error, "Expecting %s:\n", expecting);
/* Only append error if there's one line */
- if (strchr(state->arg, '\n')
!= NULL
|| strlen(state->arg) == 0) {
+ if (strchr(state->arg, '\n') || strlen(state->arg) == 0) {
return;
}
return;
}
@@
-127,7
+127,7
@@
bt_value *ini_parse_uint(struct ini_parsing_state *state)
goto end;
}
goto end;
}
- value = bt_value_
unsigned_integer
_create_init(
+ value = bt_value_
integer_unsigned
_create_init(
state->scanner->value.v_int64);
end:
state->scanner->value.v_int64);
end:
@@
-154,7
+154,7
@@
bt_value *ini_parse_neg_number(struct ini_parsing_state *state)
"Integer value -%" PRIu64 " is outside the range of a 64-bit signed integer\n",
int_val);
} else {
"Integer value -%" PRIu64 " is outside the range of a 64-bit signed integer\n",
int_val);
} else {
- value = bt_value_
signed_integer
_create_init(
+ value = bt_value_
integer_signed
_create_init(
-((int64_t) int_val));
}
-((int64_t) int_val));
}
@@
-292,7
+292,7
@@
bt_value *ini_parse_value(struct ini_parsing_state *state)
int_val);
goto end;
} else {
int_val);
goto end;
} else {
- value = bt_value_
signed_integer
_create_init(
+ value = bt_value_
integer_signed
_create_init(
(int64_t) int_val);
}
(int64_t) int_val);
}
@@
-318,17
+318,17
@@
bt_value *ini_parse_value(struct ini_parsing_state *state)
*/
const char *id = state->scanner->value.v_identifier;
*/
const char *id = state->scanner->value.v_identifier;
- if (
!strcmp(id, "null") || !strcmp(id, "NULL")
||
-
!strcmp(id, "nul")
) {
+ if (
strcmp(id, "null") == 0 || strcmp(id, "NULL") == 0
||
+
strcmp(id, "nul") == 0
) {
value = bt_value_null;
value = bt_value_null;
- } else if (
!strcmp(id, "true") || !strcmp(id, "TRUE")
||
-
!strcmp(id, "yes")
||
-
!strcmp(id, "YES")
) {
+ } else if (
strcmp(id, "true") == 0 || strcmp(id, "TRUE") == 0
||
+
strcmp(id, "yes") == 0
||
+
strcmp(id, "YES") == 0
) {
value = bt_value_bool_create_init(true);
value = bt_value_bool_create_init(true);
- } else if (
!strcmp(id, "false")
||
-
!strcmp(id, "FALSE")
||
-
!strcmp(id, "no")
||
-
!strcmp(id, "NO")
) {
+ } else if (
strcmp(id, "false") == 0
||
+
strcmp(id, "FALSE") == 0
||
+
strcmp(id, "no") == 0
||
+
strcmp(id, "NO") == 0
) {
value = bt_value_bool_create_init(false);
} else {
value = bt_value_string_create_init(id);
value = bt_value_bool_create_init(false);
} else {
value = bt_value_string_create_init(id);
This page took
0.026031 seconds
and
4
git commands to generate.