[PATCH xf86-video-tseng] Convert x+m/calloc/free to m/calloc/free.

Mikhail Gusarov dottedmag at dottedmag.net
Fri Oct 22 22:24:46 PDT 2010


Twas brillig at 20:48:13 22.10.2010 UTC-04 when twoerner at gmail.com did gyre and gimble:

 TW> From: Trevor Woerner <twoerner at gmail.com>

Reviewed-by: Mikhail Gusarov <dottedmag at dottedmag.net>

 TW> Signed-off-by: Trevor Woerner <twoerner at gmail.com>
 TW> ---
 TW>  src/tseng_dga.c    |    4 ++--
 TW>  src/tseng_driver.c |   10 +++++-----
 TW>  src/tseng_mode.c   |    2 +-
 TW>  3 files changed, 8 insertions(+), 8 deletions(-)

 TW> diff --git a/src/tseng_dga.c b/src/tseng_dga.c
 TW> index 70ebe23..cb57dfe 100644
 TW> --- a/src/tseng_dga.c
 TW> +++ b/src/tseng_dga.c
 TW> @@ -74,9 +74,9 @@ TsengDGAInit(ScreenPtr pScreen)
 TW>    if (!pTseng->DGAnumModes) {
 TW>      pMode = firstMode = pScrn->modes;
 TW>      while (pMode) {
 TW> -      newmodes = xrealloc(modes, (num + 1) * sizeof (DGAModeRec));
 TW> +      newmodes = realloc(modes, (num + 1) * sizeof (DGAModeRec));
 TW>        if (!newmodes) {
 TW> -        xfree(modes);
 TW> +        free(modes);
 TW>          return FALSE;
 TW>        }
 TW>        modes = newmodes;
 TW> diff --git a/src/tseng_driver.c b/src/tseng_driver.c
 TW> index 445c17e..6992671 100644
 TW> --- a/src/tseng_driver.c
 TW> +++ b/src/tseng_driver.c
 TW> @@ -269,9 +269,9 @@ TsengFreeRec(ScrnInfoPtr pScrn)
 TW>      pTseng = TsengPTR(pScrn);
 TW>      
 TW>      if (pTseng->SavedReg.RAMDAC)
 TW> -        xfree(pTseng->SavedReg.RAMDAC);
 TW> +        free(pTseng->SavedReg.RAMDAC);
 TW>  
 TW> -    xfree(pScrn->driverPrivate);
 TW> +    free(pScrn->driverPrivate);
 TW>      pScrn->driverPrivate = NULL;
 TW>  }
 TW>  
 TW> @@ -395,10 +395,10 @@ TsengProbe(DriverPtr drv, int flags)
 TW>                  foundScreen = TRUE;
 TW>              }
 TW>          }
 TW> -        xfree(usedChips);
 TW> +        free(usedChips);
 TW>      }
 TW>      
 TW> -    xfree(devSections);
 TW> +    free(devSections);
 TW>      return foundScreen;
 TW>  }
 TW>  
 TW> @@ -806,7 +806,7 @@ TsengProcessOptions(ScrnInfoPtr pScrn)
 TW>      xf86CollectOptions(pScrn, NULL);
 TW>  
 TW>      /* Process the options */
 TW> -    if (!(pTseng->Options = xalloc(sizeof(TsengOptions))))
 TW> +    if (!(pTseng->Options = malloc(sizeof(TsengOptions))))
 TW>          return FALSE;
 TW>      memcpy(pTseng->Options, TsengOptions, sizeof(TsengOptions));
 TW>      xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pTseng->Options);
 TW> diff --git a/src/tseng_mode.c b/src/tseng_mode.c
 TW> index f075226..7649efd 100644
 TW> --- a/src/tseng_mode.c
 TW> +++ b/src/tseng_mode.c
 TW> @@ -1502,7 +1502,7 @@ TsengModeInit(ScrnInfoPtr pScrn, DisplayModePtr OrigMode)
 TW>  
 TW>      /* clean up */
 TW>      if (new->RAMDAC)
 TW> -        xfree(new->RAMDAC);
 TW> +        free(new->RAMDAC);
 TW>  
 TW>      return TRUE;
 TW>  }
 TW> -- 
 TW> 1.7.3.1.127.g1bb28

 TW> _______________________________________________
 TW> xorg-devel at lists.x.org: X.Org development
 TW> Archives: http://lists.x.org/archives/xorg-devel
 TW> Info: http://lists.x.org/mailman/listinfo/xorg-devel

-- 
  http://fossarchy.blogspot.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20101023/a52d9a1c/attachment-0001.pgp>


More information about the xorg-devel mailing list