[Top][All Lists]

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

Re: emacs client/server mode hardcodes /tmp path

From: Ulrich Mueller
Subject: Re: emacs client/server mode hardcodes /tmp path
Date: Wed, 29 Oct 2008 10:28:10 +0100

>>>>> On Wed, 29 Oct 2008, Juanma Barranquero wrote:

>> +       socket_name = alloca (96 + strlen (tmpdir) + strlen (server_name));
>> +       sprintf (socket_name, "%s/emacs%d/%s",
>> +                tmpdir, (int) geteuid (), server_name);

> There was neither much point in allocating an extra 100 bytes, nor
> in allocating 96 now. The formatted uid is not going to be 88
> characters long.

You really want to optimise this? ;-) If we assume that uid_t will
never have more than 64 bits, then a value of 28 should be sufficient
for the constant.

Ulrich (voting for 42)

reply via email to

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