Patch Set 1: SOrry, I mean: If you want to retain snprintf semantics, ie. return the number of bytes that would have been written, then you need to keep 'len' and offset, because offset should not ever go over the boundary.
But 'len' may indeed go over the boundary, since it expresses this "number of byte that would have been written". Under normal circumstances, this stands true: len == offset. If the buffer is too small, then len > offset. -- To view, visit https://gerrit.osmocom.org/3537 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I695771d099833842db37a415b636035d17f1bba7 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol <[email protected]> Gerrit-Reviewer: Holger Freyther <[email protected]> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pablo Neira Ayuso <[email protected]> Gerrit-HasComments: No
