Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1383261

[QUEUED v20160420 08/19] stm class: Remove unnecessary pointer increment

From Alexander Shishkin <alexander.shishkin@linux.intel.com>
Newsgroups linux.kernel
Subject [QUEUED v20160420 08/19] stm class: Remove unnecessary pointer increment
Date 2016-04-20 12:50 +0200
Message-ID <rpXRM-6vx-25@gated-at.bofh.it> (permalink)
References <rpXRL-6vx-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Readability: a postfix increment is used on a pointer which is not
used anywhere afterwards, which may send the reader looking through
the function one extra time. Drop the unnecessary increment.

Reported-by: Alan Cox <alan.cox@intel.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Reviewed-by: Laurent Fert <laurent.fert@intel.com>
---
 drivers/hwtracing/stm/policy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwtracing/stm/policy.c b/drivers/hwtracing/stm/policy.c
index e8b50b1ac6..6c0ae29963 100644
--- a/drivers/hwtracing/stm/policy.c
+++ b/drivers/hwtracing/stm/policy.c
@@ -341,7 +341,7 @@ stp_policies_make(struct config_group *group, const char *name)
 		return ERR_PTR(-EINVAL);
 	}
 
-	*p++ = '\0';
+	*p = '\0';
 
 	stm = stm_find_device(devname);
 	kfree(devname);
-- 
2.8.0.rc3

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[QUEUED v20160420 08/19] stm class: Remove unnecessary pointer increment Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-04-20 12:50 +0200

csiph-web