Replace overly-cute coding with code that (a) has defined behavior according to the ANSI C spec, (b) gets the boundary conditions right, and (c) is about a third as long and three times more intelligible.
Replace overly-cute coding with code that (a) has defined behavior
according to the ANSI C spec, (b) gets the boundary conditions right,
and (c) is about a third as long and three times more intelligible.

janebeckman/gpdb,yazun/postgres-xl,kmjungersen/PostgresXL,zaksoup/gpdb,rubikloud/gpdb,pavanvd/postgres-xl,pavanvd/postgres-xl,lisakowen/gpdb,foyzur/gpdb,Chibin/gpdb,xuegang/gpdb,jmcatamney/gpdb,lintzc/gpdb,postmind-net/postgres-xl,jmcatamney/gpdb,lintzc/gpdb,edespino/gpdb,oberstet/postgres-xl,rvs/gpdb,adam8157/gpdb,Postgres-XL/Postgres-XL,kmjungersen/PostgresXL,arcivanov/postgres-xl,adam8157/gpdb,0x0FFF/gpdb,ovr/postgres-xl,kaknikhil/gpdb,yazun/postgres-xl,lpetrov-pivotal/gpdb,Quikling/gpdb,jmcatamney/gpdb,yuanzhao/gpdb,kmjungersen/PostgresXL,Quikling/gpdb,zaksoup/gpdb,Chibin/gpdb,chrishajas/gpdb,jmcatamney/gpdb,rubikloud/gpdb,tangp3/gpdb,ashwinstar/gpdb,Quikling/gpdb,kaknikhil/gpdb,Chibin/gpdb,jmcatamney/gpdb,cjcjameson/gpdb,50wu/gpdb,50wu/gpdb,jmcatamney/gpdb,ovr/postgres-xl,Chibin/gpdb,Postgres-XL/Postgres-XL,Chibin/gpdb,yuanzhao/gpdb,ashwinstar/gpdb,kaknikhil/gpdb,Chibin/gpdb,ashwinstar/gpdb,tangp3/gpdb,tpostgres-projects/tPostgres,edespino/gpdb,CraigHarris/gpdb,xuegang/gpdb,Chibin/gpdb,0x0FFF/gpdb,kmjungersen/PostgresXL,ashwinstar/gpdb,yuanzhao/gpdb,lpetrov-pivotal/gpdb,greenplum-db/gpdb,kaknikhil/gpdb,lintzc/gpdb,tpostgres-projects/tPostgres,ahachete/gpdb,janebeckman/gpdb,rubikloud/gpdb,Postgres-XL/Postgres-XL,ashwinstar/gpdb,randomtask1155/gpdb,greenplum-db/gpdb,Quikling/gpdb,xuegang/gpdb,ahachete/gpdb,cjcjameson/gpdb,janebeckman/gpdb,rvs/gpdb,postmind-net/postgres-xl,xuegang/gpdb,lintzc/gpdb,chrishajas/gpdb,zaksoup/gpdb,kmjungersen/PostgresXL,zaksoup/gpdb,zaksoup/gpdb,randomtask1155/gpdb,cjcjameson/gpdb,pavanvd/postgres-xl,zaksoup/gpdb,techdragon/Postgres-XL,postmind-net/postgres-xl,janebeckman/gpdb,xuegang/gpdb,atris/gpdb,chrishajas/gpdb,randomtask1155/gpdb,royc1/gpdb,atris/gpdb,yuanzhao/gpdb,cjcjameson/gpdb,CraigHarris/gpdb,randomtask1155/gpdb,ashwinstar/gpdb,rubikloud/gpdb,rvs/gpdb,rubikloud/gpdb,snaga/postgres-xl,lintzc/gpdb,lisakowen/gpdb,atris/gpdb,CraigHarris/gpdb,yazun/postgres-xl,adam8157/gpdb,yuanzhao/gpdb,ahachete/gpdb,tangp3/gpdb,ashwinstar/gpdb,rvs/gpdb,rvs/gpdb,lisakowen/gpdb,royc1/gpdb,edespino/gpdb,tangp3/gpdb,greenplum-db/gpdb,Quikling/gpdb,xinzweb/gpdb,Quikling/gpdb,edespino/gpdb,greenplum-db/gpdb,arcivanov/postgres-xl,kaknikhil/gpdb,kaknikhil/gpdb,tangp3/gpdb,oberstet/postgres-xl,cjcjameson/gpdb,ovr/postgres-xl,tangp3/gpdb,chrishajas/gpdb,janebeckman/gpdb,zeroae/postgres-xl,lisakowen/gpdb,tpostgres-projects/tPostgres,rvs/gpdb,ahachete/gpdb,lisakowen/gpdb,Quikling/gpdb,lpetrov-pivotal/gpdb,Postgres-XL/Postgres-XL,cjcjameson/gpdb,royc1/gpdb,0x0FFF/gpdb,arcivanov/postgres-xl,atris/gpdb,Chibin/gpdb,xuegang/gpdb,adam8157/gpdb,randomtask1155/gpdb,ashwinstar/gpdb,CraigHarris/gpdb,royc1/gpdb,0x0FFF/gpdb,xuegang/gpdb,lisakowen/gpdb,royc1/gpdb,xinzweb/gpdb,foyzur/gpdb,edespino/gpdb,postmind-net/postgres-xl,yazun/postgres-xl,lintzc/gpdb,foyzur/gpdb,techdragon/Postgres-XL,Chibin/gpdb,randomtask1155/gpdb,tpostgres-projects/tPostgres,xinzweb/gpdb,rvs/gpdb,royc1/gpdb,ahachete/gpdb,xinzweb/gpdb,atris/gpdb,rvs/gpdb,chrishajas/gpdb,rvs/gpdb,edespino/gpdb,lpetrov-pivotal/gpdb,adam8157/gpdb,0x0FFF/gpdb,xuegang/gpdb,foyzur/gpdb,postmind-net/postgres-xl,janebeckman/gpdb,rubikloud/gpdb,snaga/postgres-xl,arcivanov/postgres-xl,lintzc/gpdb,lpetrov-pivotal/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,randomtask1155/gpdb,kaknikhil/gpdb,oberstet/postgres-xl,xinzweb/gpdb,0x0FFF/gpdb,lintzc/gpdb,CraigHarris/gpdb,royc1/gpdb,arcivanov/postgres-xl,lpetrov-pivotal/gpdb,greenplum-db/gpdb,techdragon/Postgres-XL,chrishajas/gpdb,50wu/gpdb,xinzweb/gpdb,ahachete/gpdb,ahachete/gpdb,techdragon/Postgres-XL,lpetrov-pivotal/gpdb,foyzur/gpdb,atris/gpdb,cjcjameson/gpdb,randomtask1155/gpdb,kaknikhil/gpdb,yuanzhao/gpdb,edespino/gpdb,xinzweb/gpdb,greenplum-db/gpdb,oberstet/postgres-xl,xuegang/gpdb,edespino/gpdb,zaksoup/gpdb,lintzc/gpdb,ovr/postgres-xl,Chibin/gpdb,adam8157/gpdb,0x0FFF/gpdb,50wu/gpdb,rvs/gpdb,tangp3/gpdb,ahachete/gpdb,yuanzhao/gpdb,kaknikhil/gpdb,zeroae/postgres-xl,techdragon/Postgres-XL,lisakowen/gpdb,CraigHarris/gpdb,cjcjameson/gpdb,50wu/gpdb,arcivanov/postgres-xl,snaga/postgres-xl,janebeckman/gpdb,50wu/gpdb,adam8157/gpdb,foyzur/gpdb,lpetrov-pivotal/gpdb,janebeckman/gpdb,tangp3/gpdb,yuanzhao/gpdb,edespino/gpdb,CraigHarris/gpdb,foyzur/gpdb,lisakowen/gpdb,chrishajas/gpdb,oberstet/postgres-xl,xinzweb/gpdb,Postgres-XL/Postgres-XL,cjcjameson/gpdb,CraigHarris/gpdb,pavanvd/postgres-xl,greenplum-db/gpdb,atris/gpdb,zeroae/postgres-xl,rubikloud/gpdb,50wu/gpdb,yuanzhao/gpdb,Quikling/gpdb,pavanvd/postgres-xl,zeroae/postgres-xl,50wu/gpdb,atris/gpdb,tpostgres-projects/tPostgres,foyzur/gpdb,chrishajas/gpdb,zaksoup/gpdb,jmcatamney/gpdb,janebeckman/gpdb,janebeckman/gpdb,cjcjameson/gpdb,CraigHarris/gpdb,Quikling/gpdb,zeroae/postgres-xl,kaknikhil/gpdb,yazun/postgres-xl,edespino/gpdb,snaga/postgres-xl,0x0FFF/gpdb,Quikling/gpdb,rubikloud/gpdb,royc1/gpdb,adam8157/gpdb,ovr/postgres-xl,snaga/postgres-xl,yuanzhao/gpdb