Skip to content

Commit

Permalink
drivers/atm/ambassador: kill uninit'd var warning, and fix bug
Browse files Browse the repository at this point in the history
An uninitialized variable warning illuminated an area where indeed the
variable was being used without initialization.  Unfortunately, after
verifying all such paths were fixed, the warning still appears.  So we
follow the initialization practice of other variables in this function.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Jeff Garzik committed Jul 17, 2007
1 parent ea8b4db commit b1734d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/atm/ambassador.c
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,7 @@ static int amb_open (struct atm_vcc * atm_vcc)
struct atm_qos * qos;
struct atm_trafprm * txtp;
struct atm_trafprm * rxtp;
u16 tx_rate_bits;
u16 tx_rate_bits = -1; // hush gcc
u16 tx_vc_bits = -1; // hush gcc
u16 tx_frame_bits = -1; // hush gcc

Expand Down Expand Up @@ -1096,6 +1096,8 @@ static int amb_open (struct atm_vcc * atm_vcc)
r = round_up;
}
error = make_rate (pcr, r, &tx_rate_bits, NULL);
if (error)
return error;
tx_vc_bits = TX_UBR_CAPPED;
tx_frame_bits = TX_FRAME_CAPPED;
}
Expand Down

0 comments on commit b1734d2

Please sign in to comment.