On Wed, 2002-11-13 at 13:20, Kris Van Hees wrote:
> Could the passed filenames and pathnames in the functions in vfs_ops be made
> non-const?  The use of a VFS module as transparent layer includes the ability
> to change the passed data (as suggested from the comments in vfs.h), but with
> the const qualifiers there, you cannot legally change the passed names without
> generating compiler warnings.

Well, I think that doing so would be *very* dangerous.  For one, what
are you doing to do with those strings?  Only change them in-place, but
never extend them?  You can realloc() those strings, as the pointer
might change, or they might be stack strings, but of what size?

And I'm glad it generates compiler warnings, because it should make you
stop and think 'is this actually a good idea'.

What exactly were you wanting to do anyway?

Andrew Bartlett

-- 
Andrew Bartlett                                 [EMAIL PROTECTED]
Manager, Authentication Subsystems, Samba Team  [EMAIL PROTECTED]
Student Network Administrator, Hawker College   [EMAIL PROTECTED]
http://samba.org     http://build.samba.org     http://hawkerc.net

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to