Skip to content

Commit 8e9305e

Browse files
committed
Remove sizeof
1 parent 8b60514 commit 8e9305e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

flang-rt/lib/runtime/misc-intrinsic.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,15 @@ void RTDEF(Rename)(const Descriptor &path1, const Descriptor &path2,
7474
if (!IsNullTerminated(path1.OffsetElement(), path1.ElementBytes())) {
7575
auto srcTrimPos{TrimTrailingSpaces(pathSrc, path1.ElementBytes())};
7676
char *srcPathTrim{
77-
static_cast<char *>(alloca((srcTrimPos + 1) * sizeof(char)))};
77+
static_cast<char *>(alloca((srcTrimPos + 1)))};
7878
std::memcpy(srcPathTrim, pathSrc, srcTrimPos);
7979
srcPathTrim[srcTrimPos] = '\0';
8080
srcFilePath = srcPathTrim;
8181
}
8282
if (!IsNullTerminated(path2.OffsetElement(), path2.ElementBytes())) {
8383
auto dstTrimPos{TrimTrailingSpaces(pathDst, path2.ElementBytes())};
8484
char *dstPathTrim{
85-
static_cast<char *>(alloca((dstTrimPos + 1) * sizeof(char)))};
85+
static_cast<char *>(alloca((dstTrimPos + 1)))};
8686
std::memcpy(dstPathTrim, pathDst, dstTrimPos);
8787
dstPathTrim[dstTrimPos] = '\0';
8888
dstFilePath = dstPathTrim;

0 commit comments

Comments
 (0)