Created
September 21, 2022 16:13
-
-
Save lucperkins/25cbe8a25d69fce6bfa937a6657dfce1 to your computer and use it in GitHub Desktop.
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
static V9fsFidState *coroutine_fn get_fid(V9fsPDU *pdu, int32_t fid) | |
{ | |
int err; | |
V9fsFidState *f; | |
V9fsState *s = pdu->s; | |
// Blog note: I've omitted some parts that are irrelevant to performance here. | |
QSIMPLEQ_FOREACH(f, &s->fid_list, next) { | |
if (f->fid == fid) { | |
return f; | |
} | |
} | |
return NULL; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment