squid
squid copied to clipboard
Improve comment on snmp_core.cc:snmpCreateOidFromStr
Fix typo and better reflect what the code does.
Can one of the admins verify this patch?
Try to convert an OID string representation into binary.
OK.
I still think it's useful to have a comment clarifying possible scenarios which will cause the string not to be parsed, so I've adjusted the comment inside the function.
It should be obvious to anyone reading that code (and thus seeing the comment) what kind of things reach the free and false result.
Comments have to be manually maintained, like what you are doing now. So trying to list every specific case that can reach that free+return section is difficult (eg your comment still misses cases) and forces work onto future devs. The true case(s) are more restricted and thus possibly worth documenting each one (which is already done).