Re: [PATCH] core: replace sizeof(filename) with PATH_MAX

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

 



On 03/31, Bastien Nocera wrote:
> On Fri, 2017-03-31 at 13:03 +0200, Konrad Zapalowicz wrote:
> > From: Konrad Zapałowicz <konrad.zapalowicz@xxxxxxxxxxxxx>
> > 
> > This commit replaces sizeof(filename) with PATH_MAX to match the
> > common
> > scheme which is used in other places.
> 
> I wonder why g_strdup_printf() isn't used instead. Would allow ignoring
> PATH_MAX.

I guess it is because it is easier. With g_strdup_printf() one would
have to take care about freeing memory. This is not a case with having
filename as an atomatic variable.
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux