All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 6/6]NET:AX25:ROSE Removes a conditional return and corrects the return value.
@ 2016-07-16  9:46 Richard Stearn
  0 siblings, 0 replies; only message in thread
From: Richard Stearn @ 2016-07-16  9:46 UTC (permalink / raw)
  To: netdev, linux-hams

Subject: [PATCH 6/6]NET:AX25:ROSE Removes a conditional return and corrects the return value.
Removes a conditional return and corrects the return value.

The ROSE header is always finished (as it is not dependant on daddr) so
the test for daddr is not required.

Return value fixed as positive added header length.

Signed-off-by: Richard Stearn <richard@rns-stearn.demon.co.uk>
---
 net/rose/rose_dev.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/net/rose/rose_dev.c b/net/rose/rose_dev.c
index 44eca10..dc38608 100644
--- a/net/rose/rose_dev.c
+++ b/net/rose/rose_dev.c
@@ -47,10 +47,7 @@ static int rose_header(struct sk_buff *skb, struct net_device *dev,
 	*buff++ = 0x7F;				/* magic marker */
 	*buff++ = AX25_P_IP;			/* this is an IP packet */
 
-	if (daddr != NULL)
-		return 37;
-
-	return -37;
+	return ROSE_MIN_LEN + 2;	/* always creates a finished header */
 }
 
 static int rose_set_mac_address(struct net_device *dev, void *addr)

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-07-16  9:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-16  9:46 [PATCH 6/6]NET:AX25:ROSE Removes a conditional return and corrects the return value Richard Stearn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.