Skip to content

Instantly share code, notes, and snippets.

@rhizoome
Created September 30, 2016 11:14
Show Gist options
  • Save rhizoome/2209fcbce4f4d5bfd909d20c38753cd6 to your computer and use it in GitHub Desktop.
Save rhizoome/2209fcbce4f4d5bfd909d20c38753cd6 to your computer and use it in GitHub Desktop.
int i = 0;
while(
i < sizeof(tmp_conf->IDENTITY) &&
tmp_conf->IDENTITY[i] == 0
) i += 1;
if(tmp_conf->IDENTITY[i] == 0)
_ch_random_ints_to_bytes(ichirp->identity, 16);
else
*ichirp->identity = *tmp_conf->IDENTITY;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment