mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
[master] Add isc_buffer_printf()
4767. [func] Add a new function, isc_buffer_printf(), which can be used to append a formatted string to the used region of a buffer. [RT #46201]
This commit is contained in:
@@ -1036,12 +1036,7 @@ named_os_shutdownmsg(char *command, isc_buffer_t *text) {
|
||||
pid = getpid();
|
||||
#endif
|
||||
|
||||
n = snprintf((char *)isc_buffer_used(text),
|
||||
isc_buffer_availablelength(text),
|
||||
"pid: %ld", (long)pid);
|
||||
/* Only send a message if it is complete. */
|
||||
if (n > 0 && n < isc_buffer_availablelength(text))
|
||||
isc_buffer_add(text, n);
|
||||
(void)isc_buffer_printf(text, "pid: %ld", (long)pid);
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user