Re: [patch 1/4] add kstrndup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 08 May 2007 13:51:30 -0700 Jeremy Fitzhardinge wrote:

> --- a/mm/util.c
> +++ b/mm/util.c
> @@ -18,7 +18,7 @@ void *__kzalloc(size_t size, gfp_t flags
>  }
>  EXPORT_SYMBOL(__kzalloc);
>  
> -/*
> +/**
>   * kstrdup - allocate space for and copy an existing string

No blank ("*") line between function name and its parameters.
(occurs in multiple places in multiple patches in this series;
I'm not going to point out each one of them separately)

>   *
>   * @s: the string to duplicate
> @@ -39,6 +39,33 @@ char *kstrdup(const char *s, gfp_t gfp)
>  	return buf;
>  }
>  EXPORT_SYMBOL(kstrdup);
> +
> +/**
> + * kstrndup - allocate space for and copy an existing string
> + *
> + * @s: the string to duplicate
> + * @max: read at most @max chars from @s
> + * @gfp: the GFP mask used in the kmalloc() call when allocating memory
> + */
> +char *kstrndup(const char *s, size_t max, gfp_t gfp)
> +{
> +}
> +EXPORT_SYMBOL(kstrndup);
>  
>  /**
>   * kmemdup - duplicate region of memory
> ===================================================================

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux