From: Bert Vermeulen Date: Thu, 2 Oct 2014 12:53:20 +0000 (+0200) Subject: asix-sigma: Trigger code cleanup. X-Git-Tag: libsigrok-0.4.0~901 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=382cb19f29f9fe973199ebaf906264bd2eee5818;p=libsigrok.git asix-sigma: Trigger code cleanup. This cleans up a warning generated by clang's static analyzer. --- diff --git a/src/hardware/asix-sigma/asix-sigma.c b/src/hardware/asix-sigma/asix-sigma.c index db9f404e..d1bca4ef 100644 --- a/src/hardware/asix-sigma/asix-sigma.c +++ b/src/hardware/asix-sigma/asix-sigma.c @@ -201,10 +201,10 @@ static int sigma_read_pos(uint32_t *stoppos, uint32_t *triggerpos, /* Not really sure why this must be done, but according to spec. */ if ((--*stoppos & 0x1ff) == 0x1ff) - stoppos -= 64; + *stoppos -= 64; if ((*--triggerpos & 0x1ff) == 0x1ff) - triggerpos -= 64; + *triggerpos -= 64; return 1; } @@ -1342,6 +1342,7 @@ static void add_trigger_function(enum triggerop oper, enum triggerfunc func, aset = (*mask >> i) & 1; bset = x[b][a]; + rset = 0; if (func == FUNC_AND || func == FUNC_NAND) rset = aset & bset; else if (func == FUNC_OR || func == FUNC_NOR)