Re: [PATCH BlueZ v3 1/2] plugins: Use open()/read() instead of fopen()/fread() on autopair

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

 



Hi Lizardo,

On Tue, May 28, 2013, Anderson Lizardo wrote:
> On Tue, May 21, 2013 at 9:06 AM, Anderson Lizardo
> <anderson.lizardo@xxxxxxxxxxxxx> wrote:
> > open()/read() is more common on BlueZ code. Incidentally, get rid of
> > this compilation error (using gcc 4.6.3):
> >
> > plugins/autopair.c: In function ‘autopair_init’:
> > plugins/autopair.c:154:8: error: ignoring return value of ‘fread’,
> > declared with attribute warn_unused_result [-Werror=unused-result]
> > ---
> >  plugins/autopair.c |   22 +++++++++++++++-------
> >  1 file changed, 15 insertions(+), 7 deletions(-)
> >
> > v3:
> >
> > * Fix buggy logic
> > * The obvious code path is tested by just starting bluetoothd, which will call
> >   autopair_init()
> > * Maybe overkill, but I used this mockup code to test other unreachable code
> >   paths: http://ix.io/5JC
> > * I agree with Marcel that we should just fail if /dev/urandom is not readable.
> >   Otherwise, we are introducing code that will 99% of the time not be run
> >   (unless someone confirms that we have systems with unusable /dev/urandom).
> 
> Ping. There were no further comments on the idea of removing the
> "time(NULL)" fallback suggested by Marcel.
> 
> Should I proceed with dropping the time(NULL) fallback or may this
> patch be applied as is?

I pushed the current patches, however I wont object to a third one to
get rid of the time(NULL) call.

Johan
--
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