[PATCH] D139449: [ObjYAML] Use strcmp instead of strncmp
Alf via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 6 13:45:14 PST 2022
gAlfonso-bit updated this revision to Diff 480610.
gAlfonso-bit added a comment.
Clang-Format
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.480610.patch
Type: text/x-patch
Size: 672 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221206/ea6fe84e/attachment.bin>
More information about the llvm-commits
mailing list