staging: rtl8712: Simplify return
PATCH v2 1/1 staging: rtl8712: Simplify return
Simplified the multiline check to a single return statement.
---
Changes in v2:
- Removed if-else and replaced it with a single return statement
drivers/staging/rtl8712/xmit_linux.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/staging/rtl8712/xmit_linux.c +1 -4
@@ -70,10 +70,7 @@ uint _r8712_pktfile_read(struct pkt_file *pfile, u8 *rmem, uint rlen)sint r8712_endofpktfile (struct pkt_file *pfile) { -if (pfile->pkt_len ==0 ) -return true; -else -return false; +return (pfile->pkt_len ==0 ); }
--
2.1.4
Quoted 3 lines · Bhaktipriya Shridhar
Simplified the multiline check to a single return statement.
Signed-off-by Bhaktipriya Shridhar <[email protected]>
Quoted 31 lines
---
Changes in v2:
- Removed if-else and replaced it with a single return statementdrivers/staging/rtl8712/xmit_linux.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)drivers/staging/rtl8712/xmit_linux.c +1
-5@@ -70,10 +70,7 @@ uint _r8712_pktfile_read(struct pkt_file *pfile, u8 *rmem, uint rlen)sint r8712_endofpktfile (struct pkt_file *pfile) { -if (pfile->pkt_len ==0 ) -return true; -else -return false; +return (pfile->pkt_len ==0 ); } --2.1.4
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160222132944.GA18018%40Karyakshetra.
For more options, visit https://groups.google.com/d/optout.