svn commit: r193928 - stable/7/lib/libutil

Dag-Erling Smorgrav des at FreeBSD.org
Wed Jun 10 14:52:36 UTC 2009


Author: des
Date: Wed Jun 10 14:52:34 2009
New Revision: 193928
URL: http://svn.freebsd.org/changeset/base/193928

Log:
  merge r173719: constify expand_number(3).

Modified:
  stable/7/lib/libutil/   (props changed)
  stable/7/lib/libutil/expand_number.3
  stable/7/lib/libutil/expand_number.c
  stable/7/lib/libutil/libutil.h

Modified: stable/7/lib/libutil/expand_number.3
==============================================================================
--- stable/7/lib/libutil/expand_number.3	Wed Jun 10 14:38:39 2009	(r193927)
+++ stable/7/lib/libutil/expand_number.3	Wed Jun 10 14:52:34 2009	(r193928)
@@ -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

Modified: stable/7/lib/libutil/expand_number.c
==============================================================================
--- stable/7/lib/libutil/expand_number.c	Wed Jun 10 14:38:39 2009	(r193927)
+++ stable/7/lib/libutil/expand_number.c	Wed Jun 10 14:52:34 2009	(r193928)
@@ -47,7 +47,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;

Modified: stable/7/lib/libutil/libutil.h
==============================================================================
--- stable/7/lib/libutil/libutil.h	Wed Jun 10 14:38:39 2009	(r193927)
+++ stable/7/lib/libutil/libutil.h	Wed Jun 10 14:52:34 2009	(r193928)
@@ -84,7 +84,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);


More information about the svn-src-all mailing list