summaryrefslogtreecommitdiff
path: root/src/include/pgstat.h
diff options
context:
space:
mode:
authorAndres Freund2017-09-19 21:17:20 +0000
committerAndres Freund2017-09-19 21:25:47 +0000
commit71edbb6f66f7139d6209334ef8734a122ba06b56 (patch)
tree7a8644d2b6a04c67fdf92ae3f31c8b31b7968bbf /src/include/pgstat.h
parent54b6cd589ac2f5635a42511236a5eb7299e2dcaf (diff)
Avoid use of non-portable strnlen() in pgstat_clip_activity().
The use of strnlen rather than strlen was just paranoia. Instead of giving up on the paranoia, just implement the safeguard differently. And add a comment explaining why we're careful. Author: Andres Freund Discussion: https://postgr.es/m/E1duOkJ-0001Mc-U5@gemulon.postgresql.org
Diffstat (limited to 'src/include/pgstat.h')
-rw-r--r--src/include/pgstat.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/pgstat.h b/src/include/pgstat.h
index 52af0aa541..089b7c3a10 100644
--- a/src/include/pgstat.h
+++ b/src/include/pgstat.h
@@ -1199,7 +1199,7 @@ extern PgStat_BackendFunctionEntry *find_funcstat_entry(Oid func_id);
extern void pgstat_initstats(Relation rel);
-extern char *pgstat_clip_activity(const char *activity);
+extern char *pgstat_clip_activity(const char *raw_activity);
/* ----------
* pgstat_report_wait_start() -