lkml.org 
[lkml]   [2013]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V2 2/8] pktcdvd: Convert printk to pr_<level>
On Fri, May 31, 2013 at 09:11:23PM -0700, Joe Perches wrote:
> +static const char *sense_key_string(__u8 index)
> +{
> + static const char *info[9] = {
> + "No sense", "Recovered error", "Not ready",
> + "Medium error", "Hardware error", "Illegal request",
> + "Unit attention", "Data protect", "Blank check"
> + };
> + if (index < 8)

Off by one:

if (index < 9)


> + return info[index];
> + return "INVALID";

regards,
dan carpenter



\
 
 \ /
  Last update: 2013-06-03 12:41    [W:0.100 / U:1.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site