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


Groups > linux.kernel > #1374288

[QUEUED v20160408 08/18] stm class: Remove unnecessary pointer increment

From Alexander Shishkin <alexander.shishkin@linux.intel.com>
Newsgroups linux.kernel
Subject [QUEUED v20160408 08/18] stm class: Remove unnecessary pointer increment
Date 2016-04-08 17:10 +0200
Message-ID <rlGcP-5Mb-29@gated-at.bofh.it> (permalink)
References <rlG37-5o2-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>
---
 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 | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[QUEUED v20160408 00/18] stm class/intel_th: Patches in my queue Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-04-08 17:00 +0200
  [QUEUED v20160408 09/18] intel_th: pti: Do remove sysfs group on device removal Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-04-08 17:00 +0200
  [QUEUED v20160408 15/18] intel_th: msu: Serialize enabling/disabling Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-04-08 17:00 +0200
  [QUEUED v20160408 10/18] intel_th: msu: Handle kstrndup() failure Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-04-08 17:10 +0200
  [QUEUED v20160408 07/18] stm class: Fix stm device initialization order Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-04-08 17:10 +0200
  [QUEUED v20160408 08/18] stm class: Remove unnecessary pointer increment Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-04-08 17:10 +0200
  [QUEUED v20160408 04/18] stm class: stm_heartbeat: Make nr_devs parameter read-only Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-04-08 17:10 +0200
  [QUEUED v20160408 03/18] stm class: dummy_stm: Make nr_dummies parameter read-only Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-04-08 17:10 +0200

csiph-web