[PATCH][next] um: Malloc just enough space for fitting pid file
Johannes Berg
johannes at sipsolutions.net
Sat Oct 26 01:03:37 PDT 2024
On Sat, 2024-10-26 at 20:59 +1300, Paulo Miguel Almeida wrote:
>
> when I said that "umid is already generated during make_umid_init
> __initcall", from my humble point of view, I was explaining the 'why'
> using UMID_LEN for calculation buffer sizes was redundant. Then again,
> once we know the size of char* umid, we can use strlen(umid) instead.
That's not "why am I changing it" though, that's "why does it work".
The only reasonable explanation I could come up with is that you're
trying to save memory ... but why go to the trouble for a function
that's called exactly once?
johannes
More information about the linux-um
mailing list