Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jun 2009 14:52:35 +0000 (UTC)
From:      Dag-Erling Smorgrav <des@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r193928 - stable/7/lib/libutil
Message-ID:  <200906101452.n5AEqZwV017005@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906101452.n5AEqZwV017005>