Patchwork D1032: exewrapper: format with clang-format

login
register
mail settings
Submitter phabricator
Date Oct. 13, 2017, 2:05 p.m.
Message ID <25dc677ce3319a65508d1f8110504f0e@localhost.localdomain>
Download mbox | patch
Permalink /patch/24823/
State Not Applicable
Headers show

Comments

phabricator - Oct. 13, 2017, 2:05 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG31c6c4d27be7: exewrapper: format with clang-format (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1032?vs=2632&id=2674

REVISION DETAIL
  https://phab.mercurial-scm.org/D1032

AFFECTED FILES
  mercurial/exewrapper.c

CHANGE DETAILS




To: durin42, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/mercurial/exewrapper.c b/mercurial/exewrapper.c
--- a/mercurial/exewrapper.c
+++ b/mercurial/exewrapper.c
@@ -23,7 +23,6 @@ 
 }
 #endif
 
-
 static char pyscript[MAX_PATH + 10];
 static char pyhome[MAX_PATH + 10];
 static char envpyhome[MAX_PATH + 10];
@@ -40,11 +39,10 @@ 
 	HANDLE hfind;
 	const char *err;
 	HMODULE pydll;
-	void (__cdecl *Py_SetPythonHome)(char *home);
-	int (__cdecl *Py_Main)(int argc, char *argv[]);
+	void(__cdecl * Py_SetPythonHome)(char *home);
+	int(__cdecl * Py_Main)(int argc, char *argv[]);
 
-	if (GetModuleFileName(NULL, pyscript, sizeof(pyscript)) == 0)
-	{
+	if (GetModuleFileName(NULL, pyscript, sizeof(pyscript)) == 0) {
 		err = "GetModuleFileName failed";
 		goto bail;
 	}
@@ -87,10 +85,12 @@ 
 		strcat_s(pydllfile, sizeof(pydllfile), "\\" HGPYTHONLIB ".dll");
 		pydll = LoadLibrary(pydllfile);
 		if (pydll == NULL) {
-			err = "failed to load private Python DLL " HGPYTHONLIB ".dll";
+			err = "failed to load private Python DLL " HGPYTHONLIB
+			      ".dll";
 			goto bail;
 		}
-		Py_SetPythonHome = (void*)GetProcAddress(pydll, "Py_SetPythonHome");
+		Py_SetPythonHome =
+		    (void *)GetProcAddress(pydll, "Py_SetPythonHome");
 		if (Py_SetPythonHome == NULL) {
 			err = "failed to get Py_SetPythonHome";
 			goto bail;
@@ -106,7 +106,7 @@ 
 		}
 	}
 
-	Py_Main = (void*)GetProcAddress(pydll, "Py_Main");
+	Py_Main = (void *)GetProcAddress(pydll, "Py_Main");
 	if (Py_Main == NULL) {
 		err = "failed to get Py_Main";
 		goto bail;
@@ -133,7 +133,7 @@ 
 	name of our exe (argv[0]) in the position where the python.exe
 	canonically is, and insert the pyscript next.
 	*/
-	pyargv = malloc((argc + 5) * sizeof(char*));
+	pyargv = malloc((argc + 5) * sizeof(char *));
 	if (pyargv == NULL) {
 		err = "not enough memory";
 		goto bail;