]> sigrok.org Git - libsigrok.git/commitdiff
asyc-ii: Rephrase "exponent" logic when parsing packets
authorGerhard Sittig <redacted>
Sat, 31 Dec 2016 13:25:07 +0000 (14:25 +0100)
committerUwe Hermann <redacted>
Sat, 7 Jan 2017 14:51:47 +0000 (15:51 +0100)
Replace a C library strcspn(3) call with the more portable glib
g_strstr_len(3) routine. This is possible since a single separator
is searched for, no actual "set of characters" is involved.

As a byproduct, this eliminates a "late" reference to 'cnt' at the
bottom of the routine, after the value was assigned in a rather distant
location at the top of the routine. The cost of strlen() should be
acceptable for a buffer with a single digit total length.


No differences found