summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2015-05-09 11:17:38 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2015-05-09 11:17:45 -0700
commit9ffefd5b3d38e9ed2b5ed59bc50e8a7da761fb77 (patch)
tree04c125d8c2fc3a8786fff8168756ca3f12c1de8c
parent15f9d88e13bda2617c05c278a1ca9f6ce26df479 (diff)
Replace XtMalloc+sprintf pair with XtAsprintf call
Raises required version of libXt to >= 1.0.99.1 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--configure.ac2
-rw-r--r--setvalues.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 3fdc37d..9f10229 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,7 +38,7 @@ XORG_MACROS_VERSION(1.8)
XORG_DEFAULT_OPTIONS
# Obtain compiler/linker options from depedencies
-PKG_CHECK_MODULES(EDITRES, xaw7 x11 xt xmu)
+PKG_CHECK_MODULES(EDITRES, [xaw7 x11 xt >= 1.0.99.1 xmu])
PKG_CHECK_MODULES(APPDEFS, xt)
xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`
diff --git a/setvalues.c b/setvalues.c
index c2ff3d2..a28bcf9 100644
--- a/setvalues.c
+++ b/setvalues.c
@@ -99,8 +99,7 @@ GetResourceValueForSetValues(WNode *node, unsigned short *size)
* the resource database.
*/
- temp = XtMalloc(sizeof(char) * (strlen(ptr) + strlen(RESOURCE_NAME) + 2));
- sprintf(temp, "%s:%s", RESOURCE_NAME, ptr);
+ XtAsprintf(&temp, "%s:%s", RESOURCE_NAME, ptr);
XrmPutLineResource(&db, temp);
XtFree(temp);