lkml.org 
[lkml]   [2013]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] efivarfs: fix abnormal GUID in variable name by using strcpy to replace null with dash
On 03/06/2013 03:34 PM, joeyli wrote:
> +static unsigned long variable_name_length(efi_char16_t *variable_name)
> +{
> + unsigned long len;
> + efi_char16_t c;
> +
> + len = 2;
> + do {
> + c = variable_name[len / sizeof(c) - 1];
> + if (c)
> + len += sizeof(c);
> + } while (c);
> +
> + return len;
> +}
> +

It looks like this function can be replaced with utf16_strsize.


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