Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Commit

Permalink
alloca's parameter is supposed to be of type size_t
Browse files Browse the repository at this point in the history
  • Loading branch information
brentr authored and FooBarWidget committed Sep 2, 2009
1 parent 0f575c3 commit 5bafb12
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions missing/alloca.c
Expand Up @@ -29,6 +29,7 @@
static char SCCSid[] = "@(#)alloca.c 1.1"; /* for the "what" utility */
#endif

#include <sys/types.h>
#include "config.h"
#ifdef emacs
#ifdef static
Expand All @@ -44,11 +45,7 @@ lose
#endif /* static */
#endif /* emacs */

#ifdef X3J11
typedef void *pointer; /* generic pointer type */
#else
typedef char *pointer; /* generic pointer type */
#endif /* X3J11 */

#define NULL 0 /* null pointer constant */

Expand Down Expand Up @@ -140,8 +137,7 @@ typedef union hdr
static header *last_alloca_header = NULL; /* -> last alloca header */

pointer
alloca (size) /* returns pointer to storage */
unsigned size; /* # bytes to allocate */
alloca (size_t size) /* returns pointer to storage */
{
auto char probe; /* probes stack depth: */
register char *depth = &probe;
Expand Down

0 comments on commit 5bafb12

Please sign in to comment.