]> granicus.if.org Git - postgis/commitdiff
Rename "errmsg" variable to avoid clash with PostgreSQL global
authorSandro Santilli <strk@keybit.net>
Mon, 4 May 2015 07:57:43 +0000 (07:57 +0000)
committerSandro Santilli <strk@keybit.net>
Mon, 4 May 2015 07:57:43 +0000 (07:57 +0000)
Patch by Haribabu Kommi

git-svn-id: http://svn.osgeo.org/postgis/trunk@13472 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/long_xact.c

index c2b7c2f44259858e8919fd490bae061f45301386..bbcaf96cacf71056db91e66ce85bce725b94bfa2 100644 (file)
@@ -49,7 +49,7 @@ Datum check_authorization(PG_FUNCTION_ARGS)
        char *authtable = "authorization_table";
        const char *op;
 #define ERRMSGLEN 256
-       char errmsg[ERRMSGLEN];
+       char err_msg[ERRMSGLEN];
 
 
        /* Make sure trigdata is pointing at what I expect */
@@ -155,14 +155,14 @@ Datum check_authorization(PG_FUNCTION_ARGS)
 
 fail:
 
-       snprintf(errmsg, ERRMSGLEN, "%s where \"%s\" = '%s' requires authorization '%s'",
+       snprintf(err_msg, ERRMSGLEN, "%s where \"%s\" = '%s' requires authorization '%s'",
                 op, colname, pk_id, lockcode);
-       errmsg[ERRMSGLEN-1] = '\0';
+       err_msg[ERRMSGLEN-1] = '\0';
 
 #ifdef ABORT_ON_AUTH_FAILURE
-       elog(ERROR, "%s", errmsg);
+       elog(ERROR, "%s", err_msg);
 #else
-       elog(NOTICE, "%s", errmsg);
+       elog(NOTICE, "%s", err_msg);
 #endif
 
        SPI_finish();