Transforms patch not respecting if indentation

Started by Michael Paquierover 10 years ago2 messages
#1Michael Paquier
michael.paquier@gmail.com
1 attachment(s)

Hi all,

Coverity complained about a small indentation issue in ruleutils.c:
+               appendStringInfoString(buf, "\n TRANSFORM ");
+               for (i = 0; i < ntypes; i++)
+               {
+                       if (i != 0)
+                               appendStringInfoString(buf, ", ");
+                               appendStringInfo(buf, "FOR TYPE %s",
format_type_be(trftypes[i]));
+               }
Regards,
-- 
Michael

Attachments:

20150504_ruleutils_ident.patchtext/x-diff; charset=US-ASCII; name=20150504_ruleutils_ident.patchDownload
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c
index fea8db6..69267bd 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -2364,7 +2364,7 @@ print_function_trftypes(StringInfo buf, HeapTuple proctup)
 		{
 			if (i != 0)
 				appendStringInfoString(buf, ", ");
-				appendStringInfo(buf, "FOR TYPE %s", format_type_be(trftypes[i]));
+			appendStringInfo(buf, "FOR TYPE %s", format_type_be(trftypes[i]));
 		}
 	}
 }
#2Magnus Hagander
magnus@hagander.net
In reply to: Michael Paquier (#1)
Re: Transforms patch not respecting if indentation

On Mon, May 4, 2015 at 6:45 AM, Michael Paquier <michael.paquier@gmail.com>
wrote:

Hi all,

Coverity complained about a small indentation issue in ruleutils.c:
+               appendStringInfoString(buf, "\n TRANSFORM ");
+               for (i = 0; i < ntypes; i++)
+               {
+                       if (i != 0)
+                               appendStringInfoString(buf, ", ");
+                               appendStringInfo(buf, "FOR TYPE %s",
format_type_be(trftypes[i]));
+               }

Applied, thanks.

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/