struct file_handle *handle = xzalloc (sizeof *handle);
handle->ref_cnt = 1;
- handle->id = id != NULL ? xstrdup (id) : NULL;
+ handle->id = xstrdup_if_nonnull (id);
handle->name = handle_name;
handle->referent = referent;
handle->encoding = xstrdup (encoding);
handle_name = id != NULL ? xstrdup (id) : xasprintf ("`%s'", file_name);
handle = create_handle (id, handle_name, FH_REF_FILE, properties->encoding);
handle->file_name = xstrdup (file_name);
- handle->file_name_encoding = file_name_encoding ? xstrdup (file_name_encoding) : NULL;
+ handle->file_name_encoding = xstrdup_if_nonnull (file_name_encoding);
handle->mode = properties->mode;
handle->line_ends = properties->line_ends;
handle->record_width = properties->record_width;