Constify the first argument to expand_number() so that it can

be called with a const without the compiler grisling.
This commit is contained in:
John Birrell 2007-11-18 02:20:02 +00:00
parent 78a5dd56cd
commit 26fc37307b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=173719
3 changed files with 3 additions and 3 deletions

View File

@ -37,7 +37,7 @@
.In libutil.h
.Ft int
.Fo expand_number
.Fa "char *buf" "int64_t *num"
.Fa "const char *buf" "int64_t *num"
.Fc
.Sh DESCRIPTION
The

View File

@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$");
* 8) A positive decimal number followed by a 'e' or 'E' (mult by 1 << 60).
*/
int
expand_number(char *buf, int64_t *num)
expand_number(const char *buf, int64_t *num)
{
static const char unit[] = "bkmgtpe";
char *endptr, s;

View File

@ -82,7 +82,7 @@ int forkpty(int *_amaster, char *_name,
struct termios *_termp, struct winsize *_winp);
int humanize_number(char *_buf, size_t _len, int64_t _number,
const char *_suffix, int _scale, int _flags);
int expand_number(char *_buf, int64_t *_num);
int expand_number(const char *_buf, int64_t *_num);
const char *uu_lockerr(int _uu_lockresult);
int uu_lock(const char *_ttyname);
int uu_unlock(const char *_ttyname);