Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Commit

Permalink
Comment that optional_fields is never NULL
Browse files Browse the repository at this point in the history
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
  • Loading branch information
zyga committed Sep 8, 2016
1 parent e6ce2f9 commit d20bc45
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/mountinfo.c
Expand Up @@ -235,6 +235,7 @@ static struct mountinfo_entry *parse_mountinfo_entry(const char *line)
if ((entry->mount_opts = parse_next_string_field()) == NULL)
goto fail;
entry->optional_fields = &entry->line_buf[0] + total_used++;
// NOTE: This ensure s that optional_fields is never NULL.
strcpy(entry->optional_fields, "");
for (;;) {
char *opt_field = parse_next_string_field();
Expand Down

0 comments on commit d20bc45

Please sign in to comment.