Mercurial > hg
comparison mercurial/cext/mpatch.c @ 35941:3028a3215a2e
patches: move assignment outside the conditional
Having this movement in its own patch will make the next patch clearer.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Tue, 06 Feb 2018 14:24:16 +0100 |
parents | b90e8da190da |
children | 69080ee1fb0e |
comparison
equal
deleted
inserted
replaced
35940:556218e08e25 | 35941:3028a3215a2e |
---|---|
108 if (!result) { | 108 if (!result) { |
109 result = NULL; | 109 result = NULL; |
110 goto cleanup; | 110 goto cleanup; |
111 } | 111 } |
112 out = PyBytes_AsString(result); | 112 out = PyBytes_AsString(result); |
113 if ((r = mpatch_apply(out, in, inlen, patch)) < 0) { | 113 r = mpatch_apply(out, in, inlen, patch); |
114 if (r < 0) { | |
114 Py_DECREF(result); | 115 Py_DECREF(result); |
115 result = NULL; | 116 result = NULL; |
116 } | 117 } |
117 cleanup: | 118 cleanup: |
118 mpatch_lfree(patch); | 119 mpatch_lfree(patch); |