mirror of
https://github.com/Orc/discount.git
synced 2026-09-25 04:10:00 +03:00
always use memset instead of bzero
This commit is contained in:
+1
-7
@@ -153,13 +153,7 @@ else
|
||||
AC_DEFINE 'INITRNG(x)' '(void)1'
|
||||
fi
|
||||
|
||||
if AC_CHECK_FUNCS 'bzero((char*)0,0)'; then
|
||||
: # Yay
|
||||
elif AC_CHECK_FUNCS 'memset((char*)0,0,0)'; then
|
||||
AC_DEFINE 'bzero(p,s)' 'memset(p,s,0)'
|
||||
else
|
||||
AC_FAIL "$TARGET requires bzero or memset"
|
||||
fi
|
||||
AC_CHECK_FUNCS 'memset((char*)0,0,0)' || AC_FAIL "$TARGET requires memset"
|
||||
|
||||
if AC_CHECK_FUNCS random; then
|
||||
AC_DEFINE 'COINTOSS()' '(random()&1)'
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "gethopt.h"
|
||||
#include "config.h" /* for bzero() macro on systems that don't have it */
|
||||
|
||||
|
||||
void
|
||||
@@ -16,7 +15,7 @@ struct h_context *ctx;
|
||||
int argc;
|
||||
char **argv;
|
||||
{
|
||||
bzero(ctx, sizeof *ctx);
|
||||
memset(ctx, 0, sizeof *ctx);
|
||||
ctx->argc = argc;
|
||||
ctx->argv = argv;
|
||||
ctx->optind = 1;
|
||||
|
||||
Reference in New Issue
Block a user