On Wed, 6 Sep 2017 19:04:47 +0000 <[email protected]> wrote:
Dear Joachim, > > Well, C might not have the most beautiful syntax in this regard, > > but I see no other way to make a pointer itself read-only (and > > especially the ...cmd[] pointer arrays really should be). Would > > using a typedef for that be more comfortable to you? > > Are you suggesting to typedef const char *const coChar; or something > similar and then using coChar in those places? I would still prefer > the old way for readability reasons. There is no real impact either > imho. I would also oppose a typedef. You may not see the const after the * very often, but it would still take more time to look up what a certain type StrPtrWhatever_t means. I like the approach of this patch and given that it really brings benefits, there is no reason not to merge it. This may be an example of where the C type system comes to its limits, but as you already said well, the principles of information security apply well here. With best regards Laslo -- Laslo Hunhold <[email protected]>
