From: Bborie Park Date: Sat, 24 Jan 2015 17:27:17 +0000 (+0000) Subject: slight cleanup X-Git-Tag: 2.2.0rc1~694 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f4d878d0349052bfac74f11b163d8deb684b04cf;p=postgis slight cleanup git-svn-id: http://svn.osgeo.org/postgis/trunk@13198 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/raster/rt_pg/rtpg_create.c b/raster/rt_pg/rtpg_create.c index e9d5e494b..76902cc25 100644 --- a/raster/rt_pg/rtpg_create.c +++ b/raster/rt_pg/rtpg_create.c @@ -715,7 +715,7 @@ Datum RASTER_addBandOutDB(PG_FUNCTION_ARGS) elog(NOTICE, "Invalid band index %d for adding bands. Using band index 1", dstnband); dstnband = 1; } - else if (dstnband > numbands) { + else if (numbands > 0 && dstnband > numbands) { elog(NOTICE, "Invalid band index %d for adding bands. Using band index %d", dstnband, numbands); dstnband = numbands + 1; } diff --git a/raster/rt_pg/rtpostgis.c b/raster/rt_pg/rtpostgis.c index c17210119..a4f67c1d9 100644 --- a/raster/rt_pg/rtpostgis.c +++ b/raster/rt_pg/rtpostgis.c @@ -310,7 +310,7 @@ rtpg_assignHookGDALEnabledDrivers(const char *enabled_drivers, void *extra) { POSTGIS_RT_DEBUGF(4, "GDAL_SKIP = %s", CPLGetConfigOption("GDAL_SKIP", "")); } -/* postgis.eanble_outdb_rasters */ +/* postgis.enable_outdb_rasters */ static void rtpg_assignHookEnableOutDBRasters(bool enable, void *extra) { /* do nothing for now */