Content-Length: 277904 | pFad | http://github.com/postgrespro/postgres_cluster/commit/896537f078ba4d709ce754ecaff8350fd55bdfd8

84 s/NULL byte/NUL byte/ in comment refering to C string terminator. · postgrespro/postgres_cluster@896537f · GitHub
Skip to content

Commit 896537f

Browse files
committed
s/NULL byte/NUL byte/ in comment refering to C string terminator.
Reported-By: Robert Haas Discussion: https://postgr.es/m/CA+Tgmoa+YBvWgFST2NVoeXjVSohEpK=vqnVCsoCkhTVVxfLcVQ@mail.gmail.com
1 parent f41e56c commit 896537f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/backend/postmaster/pgstat.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6297,14 +6297,14 @@ pgstat_clip_activity(const char *raw_activity)
62976297
/*
62986298
* Some callers, like pgstat_get_backend_current_activity(), do not
62996299
* guarantee that the buffer isn't concurrently modified. We try to take
6300-
* care that the buffer is always terminated by a NULL byte regardless,
6301-
* but let's still be paranoid about the string's length. In those cases
6302-
* the underlying buffer is guaranteed to be
6303-
* pgstat_track_activity_query_size large.
6300+
* care that the buffer is always terminated by a NUL byte regardless, but
6301+
* let's still be paranoid about the string's length. In those cases the
6302+
* underlying buffer is guaranteed to be pgstat_track_activity_query_size
6303+
* large.
63046304
*/
63056305
activity = pnstrdup(raw_activity, pgstat_track_activity_query_size - 1);
63066306

6307-
/* now double-guaranteed to be NULL terminated */
6307+
/* now double-guaranteed to be NUL terminated */
63086308
rawlen = strlen(activity);
63096309

63106310
/*

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/896537f078ba4d709ce754ecaff8350fd55bdfd8

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy