aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-01-20 21:33:50 +0000
committeraldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-01-20 21:33:50 +0000
commit9729696c5cb03cde296e7e9a327ff09ce31e1f42 (patch)
treed522d6eb89df384b6fe56b100028b4b8af9dda35
parent68518bebf9ae94b51427fcf53c34beed69509b6c (diff)
downloadbusybox-w32-9729696c5cb03cde296e7e9a327ff09ce31e1f42.tar.gz
busybox-w32-9729696c5cb03cde296e7e9a327ff09ce31e1f42.tar.bz2
busybox-w32-9729696c5cb03cde296e7e9a327ff09ce31e1f42.zip
- get_terminal_width_height does not and should never write to fd. Cosmetic Precaution
git-svn-id: svn://busybox.net/trunk/busybox@17421 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--include/libbb.h2
-rw-r--r--libbb/xfuncs.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 30d3006ad..0b066d1bd 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -570,7 +570,7 @@ extern void vfork_daemon(int nochdir, int noclose);
570extern void vfork_daemon_rexec(int nochdir, int noclose, 570extern void vfork_daemon_rexec(int nochdir, int noclose,
571 int argc, char **argv, char *foreground_opt); 571 int argc, char **argv, char *foreground_opt);
572#endif 572#endif
573extern int get_terminal_width_height(int fd, int *width, int *height); 573extern int get_terminal_width_height(const int fd, int *width, int *height);
574 574
575int is_in_ino_dev_hashtable(const struct stat *statbuf, char **name); 575int is_in_ino_dev_hashtable(const struct stat *statbuf, char **name);
576void add_to_ino_dev_hashtable(const struct stat *statbuf, const char *name); 576void add_to_ino_dev_hashtable(const struct stat *statbuf, const char *name);
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c
index dc160bf5c..240ac5d3d 100644
--- a/libbb/xfuncs.c
+++ b/libbb/xfuncs.c
@@ -572,7 +572,7 @@ void xstat(char *name, struct stat *stat_buf)
572 572
573/* It is perfectly ok to pass in a NULL for either width or for 573/* It is perfectly ok to pass in a NULL for either width or for
574 * height, in which case that value will not be set. */ 574 * height, in which case that value will not be set. */
575int get_terminal_width_height(int fd, int *width, int *height) 575int get_terminal_width_height(const int fd, int *width, int *height)
576{ 576{
577 struct winsize win = { 0, 0, 0, 0 }; 577 struct winsize win = { 0, 0, 0, 0 };
578 int ret = ioctl(fd, TIOCGWINSZ, &win); 578 int ret = ioctl(fd, TIOCGWINSZ, &win);