bo0ts / ddate

The ddate source ripped out of util-linux
99 stars 33 forks source link

Removing some unused code / fixing possible ARRAY_SIZE issue #22

Closed OsirisSlain closed 3 years ago

OsirisSlain commented 3 years ago

I looked over my last pull request once I noticed it had been merged. I did a deep dive into what the existing code was there for -- the last time I used C heavily was over a decade ago. I fixed an unlikely but possible future edge case error in the ARRAY_SIZE macro. I also removed some code that was no longer used or needed.

The rationale for removing the inline can be summarized at: https://stackoverflow.com/questions/7762731/whats-the-difference-between-static-and-static-inline-function. This retains compatibility with older compilers while very slightly reducing complexity.