diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-04-09 11:34:23 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-04-09 11:40:40 -0700 |
commit | a67dcc1e6ef6c0140087ee1cac630ea6ba664a3c (patch) | |
tree | b9ec008e2d00ac5570323523b815c4a66da0cbcd /src/atii2c.c | |
parent | 56efa96c5a0cee362342b3cfa63d52f57611d6c2 (diff) |
Variable scope reductions as suggested by cppcheck
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/atii2c.c')
-rw-r--r-- | src/atii2c.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/atii2c.c b/src/atii2c.c index 72b7eac..a0fa050 100644 --- a/src/atii2c.c +++ b/src/atii2c.c @@ -226,13 +226,12 @@ ATII2CPutByte I2CBusPtr pI2CBus = pI2CDev->pI2CBus; ATII2CPtr pATII2C = pI2CBus->DriverPrivate.ptr; ATIPtr pATI = pATII2C->pATI; - int i; Bool Result; ATII2CSDADirOn; /* Set data line direction to out-bound */ /* Send data byte */ - for (i = 0; i < 8; i++) + for (int i = 0; i < 8; i++) { ATII2CSDABitSet(Data & 0x80U); ATII2CSCLBitOn; @@ -381,15 +380,14 @@ ATII2CFreeScreen int iScreen ) { - I2CBusPtr pI2CBus, *ppI2CBus; - ATII2CPtr pATII2C; + I2CBusPtr *ppI2CBus; int nI2CBus; nI2CBus = xf86I2CGetScreenBuses(iScreen, &ppI2CBus); while (--nI2CBus >= 0) { - pI2CBus = ppI2CBus[nI2CBus]; - pATII2C = pI2CBus->DriverPrivate.ptr; + I2CBusPtr pI2CBus = ppI2CBus[nI2CBus]; + ATII2CPtr pATII2C = pI2CBus->DriverPrivate.ptr; xf86DestroyI2CBusRec(pI2CBus, TRUE, TRUE); free(pATII2C); |