Files
linux/drivers/clk
Mathieu J. Poirier 2c967221e8 cpufreq/arm_big_little.c: Fixing non-terminated string
When declaring char name[9] = "cluster";

name[7] is equal to the string termination character '\0'.
But later on doing:

name[7] = cluster_id + '0';

clobbers the termination character, leaving non terminated
strings in the system and potentially causing undertermined
behavior.

By initialising name[9] to "clusterX" the 8th character is
set to '\0' and affecting the 7th character with the cluster
number doesn't overwite anything.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>

[ np: The C standard says that the reminder of an initialized array of
  a known size should be initialized to zero and therefore this patch is
  unneeded, however this patch makes the intent more explicit to others
  reading the code. ]

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2013-07-19 13:43:16 +01:00
..
2013-05-30 18:27:24 -07:00
2013-04-12 11:23:41 -07:00
2013-03-19 17:20:30 -07:00
2012-08-31 11:05:18 -07:00
2013-03-22 15:18:18 -07:00
2012-07-11 15:36:45 -07:00