Skip to contentSkip to conversation

sctp: Make the function sctp_chunk_abandoned bool

PATCH Neil Horman 1 participant 1 message Jun 3, 2015 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Neil Horman

author Acked-by
#1 lore raw
Quoted 52 lines · Nicholas Krause

This makes the function sctp_chunk_abandoned bool due to this function only returning either one or zero as its return value.

---
 include/net/sctp/structs.h | 2 +-
 net/sctp/chunk.c           | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)
include/net/sctp/structs.h +1 -1
index 2bb2fcf..2691490 100644
@@ -535,7 +535,7 @@ struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *,
 void sctp_datamsg_free(struct sctp_datamsg *);
 void sctp_datamsg_put(struct sctp_datamsg *);
 void sctp_chunk_fail(struct sctp_chunk *, int error);
-int sctp_chunk_abandoned(struct sctp_chunk *);
+bool sctp_chunk_abandoned(struct sctp_chunk *);
 
 /* RFC2960 1.4 Key Terms
  *
net/sctp/chunk.c +4 -4
index a338091..7bd1991 100644
@@ -344,17 +344,17 @@ errout:
 }
 
 /* Check whether this message has expired. */
-int sctp_chunk_abandoned(struct sctp_chunk *chunk)
+bool sctp_chunk_abandoned(struct sctp_chunk *chunk)
 {
 	struct sctp_datamsg *msg = chunk->msg;
 
 	if (!msg->can_abandon)
-		return 0;
+		return false;
 
 	if (time_after(jiffies, msg->expires_at))
-		return 1;
+		return true;
 
-	return 0;
+	return false;
 }
 
 /* This chunk (and consequently entire message) has failed in its sending. */
Signature · 1 line
2.1.4

Seems reasonable