{"thread":{"id":"41614","subject":"[PATCH 1/2] xdiff/xprepare: use the XDF_DIFF_ALG() macro to access flag bits","startedAt":"2016-03-04T23:09:36Z","lastAt":"2016-03-04T23:09:36Z","messageCount":1,"participants":["Ramsay Jones"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"280216","messageId":"56DA15B0.6050306@ramsayjones.plus.com","threadId":"41614","inReplyTo":null,"subject":"[PATCH 1/2] xdiff/xprepare: use the XDF_DIFF_ALG() macro to access flag bits","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2016-03-04T23:09:36Z","receivedAt":"2016-03-04T23:09:36Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nCommit 307ab20b3 (\"xdiff: PATIENCE/HISTOGRAM are not independent option\nbits\", 19-02-2012) introduced the XDF_DIFF_ALG() macro to access the\nflag bits used to represent the diff algorithm requested. In addition,\ncode which had used explicit manipulation of the flag bits was changed\nto use the macros.\n\nHowever, one example of direct manipulation remains. Update this code to\nuse the XDF_DIFF_ALG() macro.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\n---\n xdiff/xprepare.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/xdiff/xprepare.c b/xdiff/xprepare.c\nindex 63a22c6..5ffcf99 100644\n--- a/xdiff/xprepare.c\n+++ b/xdiff/xprepare.c\n@@ -304,7 +304,7 @@ int xdl_prepare_env(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp,\n \t\treturn -1;\n \t}\n \n-\tif (!(xpp->flags & XDF_HISTOGRAM_DIFF))\n+\tif (XDF_DIFF_ALG(xpp->flags) != XDF_HISTOGRAM_DIFF)\n \t\txdl_free_classifier(&cf);\n \n \treturn 0;\n-- \n2.7.0\n"}]}