[PATCH 4/6] added openconnect_strdup()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2014-08-26 at 14:57 +0200, Nikos Mavrogiannopoulos wrote:
> Isn't the current openconnect_strdup() process simpler? Only on
> function is exported, and it is straightforward to use.

I'm not sure about "simpler"; it's a question of *where* we put the
simplicity, and where we put the burden.

The openconnect_strdup() approach puts the burden on the caller to
remember to do it for all strings which are passed in to libopenconnect.
Callers are likely to forget and that leads to hard-to-diagnose bugs.

On the other hand, if we do a single run through all the entry points,
mostly in library.c, which take strings from outside the application
that's mostly a one-off and should isolate us from that class of bug for
ever more. 

-- 
dwmw2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5745 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openconnect-devel/attachments/20140826/5be989a7/attachment-0001.bin>


[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux