ctdb->statistics_history[0].statistics_current_time = timeval_current();
- bzero(&ctdb->statistics_current, sizeof(struct ctdb_statistics));
+ ZERO_STRUCT(ctdb->statistics_current);
ctdb->statistics_current.statistics_start_time = timeval_current();
tevent_add_timer(ctdb->ev, ctdb,
int ctdb_statistics_init(struct ctdb_context *ctdb)
{
- bzero(&ctdb->statistics, sizeof(struct ctdb_statistics));
+ ZERO_STRUCT(ctdb->statistics);
ctdb->statistics.statistics_start_time = timeval_current();
- bzero(&ctdb->statistics_current, sizeof(struct ctdb_statistics));
+ ZERO_STRUCT(ctdb->statistics_current);
ctdb->statistics_current.statistics_start_time = timeval_current();
- bzero(ctdb->statistics_history, sizeof(ctdb->statistics_history));
+ ZERO_ARRAY(ctdb->statistics_history);
tevent_add_timer(ctdb->ev, ctdb,
timeval_current_ofs(ctdb->tunable.stat_history_interval, 0),
return errno;
}
- bzero(&sin, sizeof(sin));
+ ZERO_STRUCT(sin);
sin.sin_family = AF_INET;
sin.sin_port = htons(port);
ret = bind(s, (struct sockaddr *)&sin, sizeof(sin));
int rep_initgroups(char *name, gid_t id);
#endif
-#if !defined(HAVE_BZERO) && defined(HAVE_MEMSET)
-#define bzero(a,b) memset((a),'\0',(b))
-#endif
-
#ifndef HAVE_DLERROR
#define dlerror rep_dlerror
char *rep_dlerror(void);
msg='Checking for fallthrough attribute')
# these may be builtins, so we need the link=False strategy
- conf.CHECK_FUNCS('strdup memmem printf memset memcpy memmove strcpy strncpy bzero', link=False)
+ conf.CHECK_FUNCS('strdup memmem printf memcpy memmove strcpy strncpy', link=False)
# See https://bugzilla.samba.org/show_bug.cgi?id=1097
#