On Sun, Aug 01, 2010 at 04:01:23PM -0700, Jesse Adkins wrote:
> These are leftovers from when X still used Xmalloc and friends for allocation.
> Now that those are gone, these comments are just confusing.
> Signed-off-by: Jesse Adkins <[email protected]>
> ---
>  hw/xfree86/common/xf86Init.c |    5 -----
>  hw/xfree86/parser/Flags.c    |    2 --
>  2 files changed, 0 insertions(+), 7 deletions(-)
> 
> diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
> index ba4d20a..fbb17ae 100644
> --- a/hw/xfree86/common/xf86Init.c
> +++ b/hw/xfree86/common/xf86Init.c
> @@ -1046,11 +1046,6 @@ xf86PrintDefaultLibraryPath(void)
>  int
>  ddxProcessArgument(int argc, char **argv, int i)
>  {
> -  /*
> -   * Note: can't use xalloc/xfree here because OsInit() hasn't been called
> -   * yet.  Use malloc/free instead.
> -   */
> -
>  #define CHECK_FOR_REQUIRED_ARGUMENT() \
>      if (((i + 1) >= argc) || (!argv[i + 1])) {                               
> \
>        ErrorF("Required argument to %s not specified\n", argv[i]);    \
> diff --git a/hw/xfree86/parser/Flags.c b/hw/xfree86/parser/Flags.c
> index 699dc6b..7fafb6c 100644
> --- a/hw/xfree86/parser/Flags.c
> +++ b/hw/xfree86/parser/Flags.c
> @@ -132,7 +132,6 @@ xf86parseFlagsSection (void)
>                                       if (ServerFlagsTab[i].token == token)
>                                       {
>                                               char *valstr = NULL;
> -                                             /* can't use strdup because it 
> calls malloc */
>                                               tmp = strdup 
> (ServerFlagsTab[i].name);
>                                               if (hasvalue)
>                                               {
> @@ -365,7 +364,6 @@ xf86optionListCreate( const char **options, int count, 
> int used )
>       }
>       for (i = 0; i < count; i += 2)
>       {
> -             /* can't use strdup because it calls malloc */
>               t1 = malloc (sizeof (char) *
>                               (strlen (options[i]) + 1));
>               strcpy (t1, options[i]);

if that comment isn't valid anymore, the code should use strdup too then.


Reviewed-by: Peter Hutterer <[email protected]>

Cheers,
  Peter
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to