Web lists-archives.com

Re: [MPlayer-dev-eng] [PATCH 1/2] subreader: Split a monster if() into multiple parts.




Le quintidi 5 prairial, an CCXXII, Reimar Döffinger a écrit :
> Should make code more maintainable.
> Also make sure all input variables are properly
> reset before each test.

I find this a little more readable, but this is still not terribly nice.
Maybe add a comment: /* TODO refactor that to use progressive parsing */.

Also, I suppose you noticed that both the original code suffer from the same
bug: since %n is not counted in the return value, we do not know if the
"%*[^<]<clear/>%n part of the format string has been matched, so match
should not be set just to "sscanf() >= n" but to "sscanf() >= n && plen > 0".

Regards,

-- 
  Nicolas George

Attachment: signature.asc
Description: Digital signature

_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-eng@xxxxxxxxxxxx
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng