diff options
author | marha <marha@users.sourceforge.net> | 2010-12-12 20:34:06 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-12-12 20:34:06 +0000 |
commit | d3ae6e21a12209f5c8cb8c84ba0f68fb69736844 (patch) | |
tree | 62710b8524ebc7675ebd7f4976fd7f9530ce5df2 /xorg-server/hw/xwin | |
parent | 0be679f7724e33c2761ebb67846707fb3351167b (diff) | |
parent | 3a20d23b48c1051e1f22295fd886cc7f643417f6 (diff) | |
download | vcxsrv-d3ae6e21a12209f5c8cb8c84ba0f68fb69736844.tar.gz vcxsrv-d3ae6e21a12209f5c8cb8c84ba0f68fb69736844.tar.bz2 vcxsrv-d3ae6e21a12209f5c8cb8c84ba0f68fb69736844.zip |
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/hw/xwin')
-rw-r--r-- | xorg-server/hw/xwin/windialogs.c | 5 | ||||
-rw-r--r-- | xorg-server/hw/xwin/winerror.c | 24 |
2 files changed, 17 insertions, 12 deletions
diff --git a/xorg-server/hw/xwin/windialogs.c b/xorg-server/hw/xwin/windialogs.c index 839498fbc..2ee9e5a41 100644 --- a/xorg-server/hw/xwin/windialogs.c +++ b/xorg-server/hw/xwin/windialogs.c @@ -349,11 +349,10 @@ winExitDlgProc (HWND hDialog, UINT message, winInitDialog (hDialog);
/* Format the connected clients string */
- pszConnectedClients = Xprintf (CONNECTED_CLIENTS_FORMAT,
+ if (asprintf (&pszConnectedClients, CONNECTED_CLIENTS_FORMAT,
(s_pScreenPriv->iConnectedClients == 1) ? "is" : "are",
s_pScreenPriv->iConnectedClients,
- (s_pScreenPriv->iConnectedClients == 1) ? "" : "s");
- if (!pszConnectedClients)
+ (s_pScreenPriv->iConnectedClients == 1) ? "" : "s") == -1)
return TRUE;
diff --git a/xorg-server/hw/xwin/winerror.c b/xorg-server/hw/xwin/winerror.c index edcc4db65..25d05339b 100644 --- a/xorg-server/hw/xwin/winerror.c +++ b/xorg-server/hw/xwin/winerror.c @@ -122,12 +122,15 @@ winMessageBoxF (const char *pszError, UINT uType, ...) char * pszErrorF = NULL;
char * pszMsgBox = NULL;
va_list args;
+ int size;
va_start(args, uType);
- pszErrorF = Xvprintf(pszError, args);
+ size = vasprintf (&pszErrorF, pszError, args);
va_end(args);
- if (!pszErrorF)
+ if (size == -1) {
+ pszErrorF = NULL;
goto winMessageBoxF_Cleanup;
+ }
#define MESSAGEBOXF \
"%s\n" \
@@ -138,15 +141,18 @@ winMessageBoxF (const char *pszError, UINT uType, ...) "XWin was started with the following command-line:\n\n" \
"%s\n"
- pszMsgBox = Xprintf (MESSAGEBOXF,
- pszErrorF, XVENDORNAME,
- XORG_VERSION_MAJOR, XORG_VERSION_MINOR, XORG_VERSION_PATCH, XORG_VERSION_SNAP, XORG_VERSION_CURRENT,
- BUILDERADDR,
- BUILDERSTRING,
- g_pszCommandLine);
+ size = asprintf (&pszMsgBox, MESSAGEBOXF,
+ pszErrorF, XVENDORNAME,
+ XORG_VERSION_MAJOR, XORG_VERSION_MINOR, XORG_VERSION_PATCH,
+ XORG_VERSION_SNAP, XORG_VERSION_CURRENT,
+ BUILDERADDR,
+ BUILDERSTRING,
+ g_pszCommandLine);
- if (!pszMsgBox)
+ if (size == -1) {
+ pszMsgBox = NULL;
goto winMessageBoxF_Cleanup;
+ }
/* Display the message box string */
MessageBox (NULL,
|