mirror of
https://github.com/sheumann/hush.git
synced 2025-01-04 22:34:37 +00:00
- get_terminal_width_height does not and should never write to fd. Cosmetic Precaution
This commit is contained in:
parent
d19f4aaa21
commit
af45760cca
@ -570,7 +570,7 @@ extern void vfork_daemon(int nochdir, int noclose);
|
|||||||
extern void vfork_daemon_rexec(int nochdir, int noclose,
|
extern void vfork_daemon_rexec(int nochdir, int noclose,
|
||||||
int argc, char **argv, char *foreground_opt);
|
int argc, char **argv, char *foreground_opt);
|
||||||
#endif
|
#endif
|
||||||
extern int get_terminal_width_height(int fd, int *width, int *height);
|
extern int get_terminal_width_height(const int fd, int *width, int *height);
|
||||||
|
|
||||||
int is_in_ino_dev_hashtable(const struct stat *statbuf, char **name);
|
int is_in_ino_dev_hashtable(const struct stat *statbuf, char **name);
|
||||||
void add_to_ino_dev_hashtable(const struct stat *statbuf, const char *name);
|
void add_to_ino_dev_hashtable(const struct stat *statbuf, const char *name);
|
||||||
|
@ -572,7 +572,7 @@ void xstat(char *name, struct stat *stat_buf)
|
|||||||
|
|
||||||
/* It is perfectly ok to pass in a NULL for either width or for
|
/* It is perfectly ok to pass in a NULL for either width or for
|
||||||
* height, in which case that value will not be set. */
|
* height, in which case that value will not be set. */
|
||||||
int get_terminal_width_height(int fd, int *width, int *height)
|
int get_terminal_width_height(const int fd, int *width, int *height)
|
||||||
{
|
{
|
||||||
struct winsize win = { 0, 0, 0, 0 };
|
struct winsize win = { 0, 0, 0, 0 };
|
||||||
int ret = ioctl(fd, TIOCGWINSZ, &win);
|
int ret = ioctl(fd, TIOCGWINSZ, &win);
|
||||||
|
Loading…
Reference in New Issue
Block a user