Commit Diff
Diff:
b1aa94aab8c556c9614a18b8e13c6cc8c3005b79
35eae7fa6b782ae1d000183ef2efc4383dfec4cd
Commit:
35eae7fa6b782ae1d000183ef2efc4383dfec4cd
Tree:
f3025c5b0648266d406e18043f48fbe1413ae197
Author:
Mark Jamsek <mark@jamsek.dev>
Date:
Wed Aug 31 12:53:56 2022 UTC
Message:
remove gcc ternary if extension

ok stsp@
commit - b1aa94aab8c556c9614a18b8e13c6cc8c3005b79
commit + 35eae7fa6b782ae1d000183ef2efc4383dfec4cd
blob - 8b503d2f97ddd5ce74010697dc9c40b1e8a4b7af
blob + 376ca751ab3e90181519012a124c167c699a1fb9
--- include/arraylist.h
+++ include/arraylist.h
@@ -65,7 +65,8 @@
(ARRAY_LIST).allocated + \
((ARRAY_LIST).allocated ? \
(ARRAY_LIST).allocated / 2 : \
- (ARRAY_LIST).alloc_blocksize ? : 8), \
+ (ARRAY_LIST).alloc_blocksize ?
+ (ARRAY_LIST).alloc_blocksize : 8), \
sizeof(*(ARRAY_LIST).head)); \
if ((ARRAY_LIST).p == NULL) { \
NEW_ITEM_P = NULL; \
@@ -74,7 +75,8 @@
(ARRAY_LIST).allocated += \
(ARRAY_LIST).allocated ? \
(ARRAY_LIST).allocated / 2 : \
- (ARRAY_LIST).alloc_blocksize ? : 8, \
+ (ARRAY_LIST).alloc_blocksize ?
+ (ARRAY_LIST).alloc_blocksize : 8, \
(ARRAY_LIST).head = (ARRAY_LIST).p; \
(ARRAY_LIST).p = NULL; \
}; \
blob - 77f774c3d3737b31b6f815a4434406dd96458a69
blob + f31fda0d4f1ddf7e3bc6342344086510e3539eb2
--- lib/diff_main.c
+++ lib/diff_main.c
@@ -602,7 +602,8 @@ diff_main(const struct diff_config *config, struct dif
struct diff_state state = {
.result = result,
- .recursion_depth_left = config->max_recursion_depth ? : UINT_MAX,
+ .recursion_depth_left = config->max_recursion_depth ?
+ config->max_recursion_depth : UINT_MAX,
.kd_buf = NULL,
.kd_buf_size = 0,
};
blob - f9f748fd298e5716a0fbfa2a0ff0277abc7a331e
blob + 3047221aa5a15e4fc2a5dea8267e97864da21264
--- lib/diff_output.c
+++ lib/diff_output.c
@@ -365,7 +365,7 @@ diff_output_get_label_left(const struct diff_input_inf
if (info->flags & DIFF_INPUT_LEFT_NONEXISTENT)
return "/dev/null";
- return info->left_path ? : "a";
+ return info->left_path ? info->left_path : "a";
}
const char *
@@ -374,5 +374,5 @@ diff_output_get_label_right(const struct diff_input_in
if (info->flags & DIFF_INPUT_RIGHT_NONEXISTENT)
return "/dev/null";
- return info->right_path ? : "b";
+ return info->right_path ? info->right_path : "b";
}
Omar Polo