On Tue, Apr 30, 2024 at 04:05:07PM +0200, Marek Behún wrote: > > > +{ > > > + u8 reply[OMNIA_FW_VERSION_LEN]; > > > + int err; > > > + > > > + err = omnia_cmd_read(mcu->client, > > > + bootloader ? CMD_GET_FW_VERSION_BOOT > > > + : CMD_GET_FW_VERSION_APP, > > > + reply, sizeof(reply)); > > > + if (err) > > > + return err; > > > > > + version[OMNIA_FW_VERSION_HEX_LEN - 1] = '\0'; > > > + bin2hex(version, reply, OMNIA_FW_VERSION_LEN); > > > > Hmm... I would rather use returned value > > > > char *p; > > > > p = bin2hex(...); > > *p = '\0'; > > > > return 0; > > OK. I guess > > *bin2hex(version, reply, OMNIA_FW_VERSION_LEN) = '\0'; > > would be too crazy, right? Indeed. Please don't do that. 0_0 regards, dan carpenter