[PATCH] D139449: [ObjYAML] Use strcmp instead of strncmp
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 6 16:06:11 PST 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf45195784168: [ObjYAML] Use strcmp instead of strncmp (authored by gAlfonso-bit, committed by MaskRay).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139449/new/
https://reviews.llvm.org/D139449
Files:
llvm/lib/ObjectYAML/MachOEmitter.cpp
Index: llvm/lib/ObjectYAML/MachOEmitter.cpp
===================================================================
--- llvm/lib/ObjectYAML/MachOEmitter.cpp
+++ llvm/lib/ObjectYAML/MachOEmitter.cpp
@@ -300,8 +300,7 @@
case MachO::LC_SEGMENT_64:
uint64_t segOff = is64Bit ? LC.Data.segment_command_64_data.fileoff
: LC.Data.segment_command_data.fileoff;
- if (0 ==
- strncmp(&LC.Data.segment_command_data.segname[0], "__LINKEDIT", 16)) {
+ if (0 == strcmp(LC.Data.segment_command_data.segname, "__LINKEDIT")) {
FoundLinkEditSeg = true;
LinkEditOff = segOff;
if (Obj.RawLinkEditSegment)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139449.480671.patch
Type: text/x-patch
Size: 672 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221207/2abf9e96/attachment.bin>
More information about the llvm-commits
mailing list