Compare commits

..

No commits in common. "49d7cb12bb2f47216528ea6d6f58869e0cf12a2e" and "75fc6f1c374796f9e794297c3893089009b8772f" have entirely different histories.

3 changed files with 5 additions and 5 deletions

View File

@ -205,8 +205,8 @@ static void
line_editor_start (struct line_editor *self, char prompt)
{
self->alloc = 16;
self->line = xcalloc (self->alloc, sizeof *self->line);
self->w = xcalloc (self->alloc, sizeof *self->w);
self->line = xcalloc (sizeof *self->line, self->alloc);
self->w = xcalloc (sizeof *self->w, self->alloc);
self->len = 0;
self->point = 0;
self->prompt = prompt;

View File

@ -316,7 +316,7 @@ xstrndup (const char *s, size_t n)
#define ARRAY(type, name) type *name; size_t name ## _len, name ## _alloc;
#define ARRAY_INIT_SIZED(a, n) \
BLOCK_START \
(a) = xcalloc ((a ## _alloc) = (n), sizeof *(a)); \
(a) = xcalloc (sizeof *(a), (a ## _alloc) = (n)); \
(a ## _len) = 0; \
BLOCK_END
#define ARRAY_INIT(a) ARRAY_INIT_SIZED (a, 16)
@ -398,7 +398,7 @@ strv_make (void)
struct strv self;
self.alloc = 4;
self.len = 0;
self.vector = xcalloc (self.alloc, sizeof *self.vector);
self.vector = xcalloc (sizeof *self.vector, self.alloc);
return self;
}

View File

@ -636,7 +636,7 @@ test_config_validate_nonnegative
return false;
}
static const struct config_schema g_config_test[] =
static struct config_schema g_config_test[] =
{
{ .name = "foo",
.comment = "baz",