cdown / clipmenu

Clipboard management using dmenu
MIT License
1.14k stars 91 forks source link

Misc fixes and improvements #223

Closed N-R-K closed 5 months ago

N-R-K commented 5 months ago

clipmenud: no need to use volatile sig_atomic_t

since there's no signal handlers involved and signals are handled with regular code via signalfd.

clipmenud: don't silently ignore arguments

otherwise running something like clipmenud --verbose gives the false impression of it "working".

config: range check parsed integers

negative values don't make sense for these config vars, so reject them.

also reject values that are too large and would get truncated.

clipmenud: correct cast to size_t

cdown commented 5 months ago

These look fine, thanks. My general feeling is that if one willingly shoots themself in the foot that's fine, but I am also fine with not providing the bullets :)

And thanks for noticing we no longer need sig_atomic_t, that's from before the signalfd migration.