mirror of
https://github.com/postgres/postgres.git
synced 2025-04-22 23:02:54 +03:00
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
This commit is contained in:
parent
f41e56c76e
commit
896537f078
@ -6297,14 +6297,14 @@ pgstat_clip_activity(const char *raw_activity)
|
|||||||
/*
|
/*
|
||||||
* Some callers, like pgstat_get_backend_current_activity(), do not
|
* Some callers, like pgstat_get_backend_current_activity(), do not
|
||||||
* guarantee that the buffer isn't concurrently modified. We try to take
|
* guarantee that the buffer isn't concurrently modified. We try to take
|
||||||
* care that the buffer is always terminated by a NULL byte regardless,
|
* care that the buffer is always terminated by a NUL byte regardless, but
|
||||||
* but let's still be paranoid about the string's length. In those cases
|
* let's still be paranoid about the string's length. In those cases the
|
||||||
* the underlying buffer is guaranteed to be
|
* underlying buffer is guaranteed to be pgstat_track_activity_query_size
|
||||||
* pgstat_track_activity_query_size large.
|
* large.
|
||||||
*/
|
*/
|
||||||
activity = pnstrdup(raw_activity, pgstat_track_activity_query_size - 1);
|
activity = pnstrdup(raw_activity, pgstat_track_activity_query_size - 1);
|
||||||
|
|
||||||
/* now double-guaranteed to be NULL terminated */
|
/* now double-guaranteed to be NUL terminated */
|
||||||
rawlen = strlen(activity);
|
rawlen = strlen(activity);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user