# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 2018-02-06 13:24:16
# Node ID 3028a3215a2ebe92adb1912f3f656379c8ecb300
# Parent  556218e08e257c380da72f7696d36958f5eb8c6e

patches: move assignment outside the conditional

Having this movement in its own patch will make the next patch clearer.

diff --git a/mercurial/cext/mpatch.c b/mercurial/cext/mpatch.c
--- a/mercurial/cext/mpatch.c
+++ b/mercurial/cext/mpatch.c
@@ -110,7 +110,8 @@ patches(PyObject *self, PyObject *args)
 		goto cleanup;
 	}
 	out = PyBytes_AsString(result);
-	if ((r = mpatch_apply(out, in, inlen, patch)) < 0) {
+	r = mpatch_apply(out, in, inlen, patch);
+	if (r < 0) {
 		Py_DECREF(result);
 		result = NULL;
 	}