[Rpm-maint] [rpm-software-management/rpm] add support for %{shrink:} (#296)

Panu Matilainen notifications at github.com
Wed Aug 2 10:22:03 UTC 2017


pmatilai commented on this pull request.



> @@ -864,6 +865,27 @@ doFoo(MacroBuf mb, int negate, const char * f, size_t fn,
 	if ((b = strrchr(buf, '/')) != NULL)
 	    *b = '\0';
 	b = buf;
+    } else if (STREQ("shrink", f, fn)) {
+	/*
+	 * shrink body by removing all leading and trailing whitespaces and
+	 * reducing intermediate whitespaces to a single space character.
+	 */
+	int i, j, k, was_space = 0;
+	for (i = 0, j = 0, k = (int)strlen(buf); i < k; ) {

Use the appropriate type for the variable so you dont need a silly cast like this.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/296#pullrequestreview-53756704
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20170802/e6499829/attachment.html>


More information about the Rpm-maint mailing list