On Mon, 24.11.14 12:35, Didier Roche (didro...@ubuntu.com) wrote: > > +static int get_valid_machine_id(int fd, char id[34]) { > + assert(fd >= 0); > + assert(id); > + > + if (loop_read(fd, id, 33, false) == 33 && id[32] == '\n') { > + id[32] = 0; > + > + if (id128_is_valid(id)) { > + id[32] = '\n'; > + id[33] = 0; > + return 0; > + } > + } > + > + return -EINVAL; > +}
As a matter of coding style we try hard to avoid functions that clobber their parameters if they fail. Please follow the same scheme here. Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel