diff options
author | marha <marha@users.sourceforge.net> | 2011-11-25 08:22:48 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-11-25 08:22:48 +0100 |
commit | a0b4a1330be6a36ad095222d2ea83927cd33514d (patch) | |
tree | 616920ca608751e843c92c9815069f43789e3097 /xorg-server/hw/xfree86/common/xf86Option.c | |
parent | 45710577f374972946a8eb37833a9c94e5a299bf (diff) | |
download | vcxsrv-a0b4a1330be6a36ad095222d2ea83927cd33514d.tar.gz vcxsrv-a0b4a1330be6a36ad095222d2ea83927cd33514d.tar.bz2 vcxsrv-a0b4a1330be6a36ad095222d2ea83927cd33514d.zip |
mesa xserver pixman git update 25 nov 2011
Diffstat (limited to 'xorg-server/hw/xfree86/common/xf86Option.c')
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Option.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86Option.c b/xorg-server/hw/xfree86/common/xf86Option.c index 9c528782f..dc0a01899 100644 --- a/xorg-server/hw/xfree86/common/xf86Option.c +++ b/xorg-server/hw/xfree86/common/xf86Option.c @@ -187,7 +187,7 @@ LookupRealOption(XF86OptionPtr optlist, const char *name, double deflt, static char * -LookupStrOption(XF86OptionPtr optlist, const char *name, char *deflt, Bool markUsed) +LookupStrOption(XF86OptionPtr optlist, const char *name, const char *deflt, Bool markUsed) { OptionInfoRec o; @@ -243,7 +243,7 @@ xf86SetRealOption(XF86OptionPtr optlist, const char *name, double deflt) char * -xf86SetStrOption(XF86OptionPtr optlist, const char *name, char *deflt) +xf86SetStrOption(XF86OptionPtr optlist, const char *name, const char *deflt) { return LookupStrOption(optlist, name, deflt, TRUE); } @@ -306,7 +306,7 @@ XF86OptionPtr xf86ReplaceIntOption(XF86OptionPtr optlist, const char *name, const int val) { char tmp[16]; - sprintf(tmp,"%i",val); + snprintf(tmp,sizeof(tmp),"%i",val); return xf86AddNewOption(optlist,name,tmp); } @@ -314,7 +314,7 @@ XF86OptionPtr xf86ReplaceRealOption(XF86OptionPtr optlist, const char *name, const double val) { char tmp[32]; - snprintf(tmp,32,"%f",val); + snprintf(tmp,sizeof(tmp),"%f",val); return xf86AddNewOption(optlist,name,tmp); } @@ -328,7 +328,7 @@ XF86OptionPtr xf86ReplacePercentOption(XF86OptionPtr optlist, const char *name, const double val) { char tmp[16]; - sprintf(tmp, "%lf%%", val); + snprintf(tmp, sizeof(tmp), "%lf%%", val); return xf86AddNewOption(optlist,name,tmp); } @@ -416,7 +416,7 @@ xf86FindOption(XF86OptionPtr options, const char *name) } -char * +const char * xf86FindOptionValue(XF86OptionPtr options, const char *name) { return xf86findOptionValue(options, name); |