[libc-commits] [PATCH] D147970: [libc] Add swab implementation

Roland McGrath via Phabricator via libc-commits libc-commits at lists.llvm.org
Mon Apr 10 15:56:04 PDT 2023


mcgrathr accepted this revision.
mcgrathr added a comment.
This revision is now accepted and ready to land.

lgtm!



================
Comment at: libc/src/unistd/linux/swab.cpp:18
+                    ssize_t n)) {
+  if (n < 2)
+    return;
----------------
I don't see any reason for this short-circuit. The loop will naturally have zero iterations for these cases.



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147970/new/

https://reviews.llvm.org/D147970



More information about the libc-commits mailing list