Last active
March 14, 2018 08:38
-
-
Save ik5/f0e7178a558885d938978171b623fbda to your computer and use it in GitHub Desktop.
example of self documenting code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ... */ | |
const char * get_message(void * payload) { | |
payload_t *data = payload; | |
if (!data->len > MIN_PAYLOAD_LEN) { | |
return null; | |
} | |
return sprintf("%s%s", data->name, data->content); | |
} | |
/* ..*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment