{
rspamd_fstring_t *s;
- if ((s = malloc (default_initial_size + sizeof (*s))) != 0) {
+ if ((s = malloc (default_initial_size + sizeof (*s))) == NULL) {
g_error ("%s: failed to allocate %"G_GSIZE_FORMAT" bytes",
G_STRLOC, default_initial_size + sizeof (*s));
rspamd_fstring_t *s;
gsize real_size = MAX (default_initial_size, initial_size);
- if ((s = malloc (real_size + sizeof (*s))) != 0) {
+ if ((s = malloc (real_size + sizeof (*s))) == NULL) {
g_error ("%s: failed to allocate %"G_GSIZE_FORMAT" bytes",
G_STRLOC, real_size + sizeof (*s));
rspamd_fstring_t *s;
gsize real_size = MAX (default_initial_size, len);
- if ((s = malloc (real_size + sizeof (*s))) != 0) {
+ if ((s = malloc (real_size + sizeof (*s))) == NULL) {
g_error ("%s: failed to allocate %"G_GSIZE_FORMAT" bytes",
G_STRLOC, real_size + sizeof (*s));