bug-hurd
[Top][All Lists]
Advanced

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

Re: BUG: /proc/self/exe reports relative paths, should always return abs


From: Samuel Thibault
Subject: Re: BUG: /proc/self/exe reports relative paths, should always return absolute paths?
Date: Thu, 21 Sep 2017 14:46:34 +0200
User-agent: NeoMutt/20170113 (1.7.2)

Svante Signell, on jeu. 21 sept. 2017 10:11:42 +0200, wrote:
> Sorry. Now I've built glibc successfully.
> Should this warning be fixed with a cast too?

Casting is almost never the right solution.

And here it's for a good reason: file_name is not to be modified, or
more importantly, freed.  You need another (const char*) variable which
contains what will be passed to _hurd_exec_file_name.

Also, you can use just asprintf instead of computing the size and then
calling snprintf.

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]