From: "Amit Kapila" <amit.kapil...@gmail.com>
Few minor things: 1. evtHandle = RegisterEventSource(NULL, *event_source? event_source: DEFAULT_EVENT_SOURCE);In this code, you are trying to access the value (*event_source) and incase it is not initialised, it will not contain the value and could cause problem, why not directly check 'event_source'?
event_source here is a global static char array, so it's automatically initialized with zeros and safe to access.
2. minor coding style issue pg_ctl.c evtHandle = RegisterEventSource(NULL, *event_source? event_source: DEFAULT_EVENT_SOURCE); elog.c ! evtHandle = RegisterEventSource(NULL, ! event_source ? event_source : DEFAULT_EVENT_SOURCE);In both above usages, it is better that arguments in second line should startinline with previous lines first argument. You can refer other places, for ex. refer call to ReportEvent in pg_ctl.c just below RegisterEventSource call.
Thanks. I passed the source files through pgindent and attached the revised patch. Although the arguments in the second line are not in line with the first line's arguments, that's what pgindent found good.
Regards MauMau
pg_ctl_eventsrc_v3.patch
Description: Binary data
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers