bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 5/8] util: qualify pointers whose dereferenced values are constan


From: Marin Ramesa
Subject: [PATCH 5/8] util: qualify pointers whose dereferenced values are constant with const
Date: Mon, 16 Dec 2013 23:55:16 +0100

---
 util/atoi.c | 8 ++++----
 util/atoi.h | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/util/atoi.c b/util/atoi.c
index 64816b9..e56f50d 100644
--- a/util/atoi.c
+++ b/util/atoi.c
@@ -91,11 +91,11 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 int
 mach_atoi(cp, nump)
-u_char *cp;
-int    *nump;
+const u_char   *cp;
+int            *nump;
 {
-       int     number;
-       u_char  *original;
+       int             number;
+       const u_char    *original;
 
        original = cp;
        for (number = 0; ('0' <= *cp) && (*cp <= '9'); cp++)
diff --git a/util/atoi.h b/util/atoi.h
index 921b1e8..47adb42 100644
--- a/util/atoi.h
+++ b/util/atoi.h
@@ -62,6 +62,6 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include <sys/types.h>
 
 #define MACH_ATOI_DEFAULT -1
-extern int mach_atoi (u_char *, int *);
+extern int mach_atoi (const u_char *, int *);
 
 #endif /* _UTIL_ATOI_H_ */
-- 
1.8.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]