intel / tinycrypt

tinycrypt is a library of cryptographic algorithms with a focus on small, simple implementation.
Other
446 stars 156 forks source link

tinycrypt: Use a do..while loop and remove explicit CC #57

Open rilysh opened 1 year ago

rilysh commented 1 year ago

Hello,

  1. In ctr_prng.c, the arrInc() function uses a for loop which requires defining a variable before initializing. As we're already going backward there, we can just replace the for loop with a do..while loop instead.
  2. Makefile explicitly uses GCC, however, most BSD systems don't use GCC, instead, they ship Clang by default. Dropping explicitly stating the compiler is much better as we can safely assume the CC variable already defaults to an existing/installed compiler.