[Patch] libgomp/target.c: Minor cleanup

Tobias Burnus tobias@codesourcery.com
Thu Sep 10 09:17:34 GMT 2020


Hi Jakub, hello all,

when looking at target.c, I stumbled over that code:
   size_t mapnum  → unsigned
   if (mapnum == 0)
     ...
     return;

   if (mapnum > 0 || ....)
     ...

I fail to see how the latter condition can ever become false;
hence, I removed the "if" and used the if-body unconditionally,
removing some now pointless assignments.

OK?

Tobias

-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany
Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tgt-cleanup.diff
Type: text/x-patch
Size: 1342 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200910/7cb1e2b9/attachment.bin>


More information about the Gcc-patches mailing list