Explorar el Código

[fc] Allow peers and ULPs to log out when usage count reaches zero

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown hace 14 años
padre
commit
0cd185e734
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2
    2
      src/net/fc.c

+ 2
- 2
src/net/fc.c Ver fichero

@@ -1236,7 +1236,7 @@ static void fc_peer_decrement ( struct fc_peer *peer ) {
1236 1236
 	assert ( peer->usage > 0 );
1237 1237
 
1238 1238
 	/* Decrement our usage count and log out if we reach zero */
1239
-	if ( peer->usage-- == 0 )
1239
+	if ( --(peer->usage) == 0 )
1240 1240
 		fc_peer_logout ( peer, 0 );
1241 1241
 }
1242 1242
 
@@ -1531,7 +1531,7 @@ void fc_ulp_decrement ( struct fc_ulp *ulp ) {
1531 1531
 	assert ( ulp->usage > 0 );
1532 1532
 
1533 1533
 	/* Decrement our usage count and log out if we reach zero */
1534
-	if ( ulp->usage-- == 0 )
1534
+	if ( --(ulp->usage) == 0 )
1535 1535
 		fc_ulp_logout ( ulp, 0 );
1536 1536
 
1537 1537
 	/* Decrement our peer's usage count */

Loading…
Cancelar
Guardar