[vlc-devel] [PATCH] audioscrobbler: prevent an endless loop inside the main loop

Fabian Keil freebsd-listen at fabiankeil.de
Wed Jun 20 16:08:06 CEST 2012


Rémi Denis-Courmont <remi at remlab.net> wrote:

> On Wed, 20 Jun 2012 13:28:45 +0200, Fabian Keil
> <freebsd-listen at fabiankeil.de> wrote:
> > The attached patch fixes a compiler warning and might fix the
> > issue reported in: https://trac.videolan.org/vlc/ticket/6286.
> > 
> > I don't have an account an thus couldn't test it, though.
> 
> Might as well use INT64_MIN as initializer. That would be simpler.

Thanks for the feedback.

Grepping around in vlc, I couldn't find a single instance where
INT64_MIN is used to initialize an mtime_t. The commonly used
integers seem to be 0 and -1, and now that I know that mtime_t is
signed, I prefer -1 as well.

I also realized that the second chunk of my patch shouldn't be
necessary. Attached is an updated version that only contains
the first chunk and initializes with -1 instead of 0.

Does this address your concern about simplicity, or do
you still prefer INT64_MIN?

Fabian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-audioscrobbler-prevent-an-endless-loop-inside-the-ma.patch
Type: text/x-patch
Size: 1042 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120620/bee51f17/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120620/bee51f17/attachment.sig>


More information about the vlc-devel mailing list