Skip to content

Commit da3f993

Browse files
committed
remove redundant clang-format and minor fixes
1 parent 9a73cb8 commit da3f993

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

flang/lib/Evaluate/intrinsics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2942,7 +2942,7 @@ static bool ApplySpecificChecks(SpecificCall &call, FoldingContext &context) {
29422942
ok &= CheckForCoindexedObject(context, call.arguments[3], name, "errmsg");
29432943
if (call.arguments[0] && call.arguments[1]) {
29442944
for (int j{0}; j < 2; ++j) {
2945-
if (const Symbol * last{GetLastSymbol(call.arguments[j])};
2945+
if (const Symbol *last{GetLastSymbol(call.arguments[j])};
29462946
last && !IsAllocatable(last->GetUltimate())) {
29472947
context.messages().Say(call.arguments[j]->sourceLocation(),
29482948
"Argument #%d to MOVE_ALLOC must be allocatable"_err_en_US,

flang/runtime/command.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ std::int32_t RTNAME(GetEnvVariable)(const Descriptor &name,
284284

285285
const char *ensureNullTerminated(
286286
const char *str, size_t length, Terminator &terminator) {
287-
if (length < strlen(str)) {
287+
if (length <= strlen(str)) {
288288
char *newCmd{(char *)malloc(length + 1)};
289289
if (newCmd == NULL) {
290290
terminator.Crash("Command not null-terminated, memory allocation failed "

0 commit comments

Comments
 (0)