foxpy / foxpy/dmotd

Bad code

Open
#5 2 comments 0 reactions 1 assignee Claimed by @foxpy View on GitHub
help wanted
Dominant language
C
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

1) Line length in `config.h`. I have no idea why it exists. IMO line length for motd should always be 80 chars, so setting line length in config is unnecessary.
2) VLA instead of heap. There is nothing bad in using VLA for relatively short arrays, but a better practice for all formatting functions is to allocate memory on heap and return pointer to new memory.
3) Bad API. It is very inflexible. We should provide either a config file which contains entries printed to motd or some compile time flexibility, e. g. small `configure` script which enables and disables particular features, generating custom Makefile.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.