From 5ac79d781168059f9afca94d939000578e6e483a Mon Sep 17 00:00:00 2001 From: Pierre Muller Date: Fri, 24 Apr 2009 22:10:03 +0000 Subject: [PATCH] ARI change: Use "/* ARI: rule */" pattern. * utils.c: Update ARI patterns. * gdb_dirent.h: Likewise. --- gdb/ChangeLog | 6 ++++++ gdb/gdb_dirent.h | 6 +++--- gdb/utils.c | 22 +++++++++++----------- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 918fd50176..e1ea7d5ff0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2009-04-24 Pierre Muller + + ARI change: Use "/* ARI: rule */" pattern. + * utils.c: Update ARI patterns. + * gdb_dirent.h: Likewise. + 2009-04-23 Anthony Green * MAINTAINERS: Add moxie target. diff --git a/gdb/gdb_dirent.h b/gdb/gdb_dirent.h index 020c61ad19..bd1808f649 100644 --- a/gdb/gdb_dirent.h +++ b/gdb/gdb_dirent.h @@ -21,11 +21,11 @@ /* See description of `AC_HEADER_DIRENT' in the Autoconf manual. */ #ifdef HAVE_DIRENT_H -# include /* OK: dirent.h */ -# define NAMELEN(dirent) strlen ((dirent)->d_name) /* OK: strlen d_name */ +# include /* ARI: dirent.h */ +# define NAMELEN(dirent) strlen ((dirent)->d_name) /* ARI: strlen d_name */ #else # define dirent direct -# define NAMELEN(dirent) (dirent)->d_namelen /* OK: d_namelen */ +# define NAMELEN(dirent) (dirent)->d_namelen /* ARI: d_namelen */ # ifdef HAVE_SYS_NDIR_H # include # endif diff --git a/gdb/utils.c b/gdb/utils.c index 57f267abfb..99b0e7693c 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -68,10 +68,10 @@ #include #if !HAVE_DECL_MALLOC -extern PTR malloc (); /* OK: PTR */ +extern PTR malloc (); /* ARI: PTR */ #endif #if !HAVE_DECL_REALLOC -extern PTR realloc (); /* OK: PTR */ +extern PTR realloc (); /* ARI: PTR */ #endif #if !HAVE_DECL_FREE extern void free (); @@ -1201,7 +1201,7 @@ nomem (long size) /* NOTE: These are declared using PTR to ensure consistency with "libiberty.h". xfree() is GDB local. */ -PTR /* OK: PTR */ +PTR /* ARI: PTR */ xmalloc (size_t size) { void *val; @@ -1211,7 +1211,7 @@ xmalloc (size_t size) if (size == 0) size = 1; - val = malloc (size); /* OK: malloc */ + val = malloc (size); /* ARI: malloc */ if (val == NULL) nomem (size); @@ -1224,8 +1224,8 @@ xzalloc (size_t size) return xcalloc (1, size); } -PTR /* OK: PTR */ -xrealloc (PTR ptr, size_t size) /* OK: PTR */ +PTR /* ARI: PTR */ +xrealloc (PTR ptr, size_t size) /* ARI: PTR */ { void *val; @@ -1235,16 +1235,16 @@ xrealloc (PTR ptr, size_t size) /* OK: PTR */ size = 1; if (ptr != NULL) - val = realloc (ptr, size); /* OK: realloc */ + val = realloc (ptr, size); /* ARI: realloc */ else - val = malloc (size); /* OK: malloc */ + val = malloc (size); /* ARI: malloc */ if (val == NULL) nomem (size); return (val); } -PTR /* OK: PTR */ +PTR /* ARI: PTR */ xcalloc (size_t number, size_t size) { void *mem; @@ -1257,7 +1257,7 @@ xcalloc (size_t number, size_t size) size = 1; } - mem = calloc (number, size); /* OK: xcalloc */ + mem = calloc (number, size); /* ARI: xcalloc */ if (mem == NULL) nomem (number * size); @@ -1268,7 +1268,7 @@ void xfree (void *ptr) { if (ptr != NULL) - free (ptr); /* OK: free */ + free (ptr); /* ARI: free */ }