summaryrefslogtreecommitdiff
path: root/dbug
diff options
context:
space:
mode:
Diffstat (limited to 'dbug')
-rw-r--r--dbug/Makefile.am2
-rw-r--r--dbug/dbug.c24
2 files changed, 11 insertions, 15 deletions
diff --git a/dbug/Makefile.am b/dbug/Makefile.am
index 08f0164c02c..bd512ee1d1d 100644
--- a/dbug/Makefile.am
+++ b/dbug/Makefile.am
@@ -15,7 +15,7 @@
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA
-INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include
+INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include
LDADD = libdbug.a ../strings/libmystrings.a
pkglib_LIBRARIES = libdbug.a
noinst_HEADERS = dbug_long.h
diff --git a/dbug/dbug.c b/dbug/dbug.c
index c6df6b105c5..d96ef0cae09 100644
--- a/dbug/dbug.c
+++ b/dbug/dbug.c
@@ -280,7 +280,7 @@ static BOOLEAN Writable(char *pathname);
static void ChangeOwner(char *pathname);
/* Allocate memory for runtime support */
#endif
-static char *DbugMalloc(int size);
+static char *DbugMalloc(size_t size);
/* Remove leading pathname components */
static char *BaseName(const char *pathname);
static void DoPrefix(uint line);
@@ -1120,7 +1120,7 @@ static void PushState ()
init_done=TRUE;
}
(void) code_state(); /* Alloc memory */
- new_malloc = (struct state *) DbugMalloc (sizeof (struct state));
+ new_malloc = (struct state *) DbugMalloc(sizeof (struct state));
new_malloc -> flags = 0;
new_malloc -> delay = 0;
new_malloc -> maxdepth = MAXDEPTH;
@@ -1341,11 +1341,10 @@ struct link *linkp)
*/
-static char *StrDup (
-const char *str)
+static char *StrDup (const char *str)
{
reg1 char *new_malloc;
- new_malloc = DbugMalloc ((int) strlen (str) + 1);
+ new_malloc = DbugMalloc((size_t) strlen (str) + 1);
(void) strcpy (new_malloc, str);
return (new_malloc);
}
@@ -1606,14 +1605,13 @@ static void DbugExit (const char *why)
*
*/
-static char *DbugMalloc (
-int size)
+static char *DbugMalloc (size_t size)
{
- register char *new_malloc;
+ register char *new_malloc;
- if (!(new_malloc = (char*) malloc ((unsigned int) size)))
- DbugExit ("out of memory");
- return (new_malloc);
+ if (!(new_malloc = (char*) malloc((size_t) size)))
+ DbugExit ("out of memory");
+ return (new_malloc);
}
@@ -1622,9 +1620,7 @@ int size)
* separator (to allow directory-paths in dos).
*/
-static char *static_strtok (
-char *s1,
-pchar separator)
+static char *static_strtok (char *s1, pchar separator)
{
static char *end = NULL;
reg1 char *rtnval,*cpy;