Clarify structure of parsing with comments:

1. Parse through to get the required buffer length.
2. Having allocated a buffer, parse into the buffer.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
diff --git a/library/oid.c b/library/oid.c
index 1031990..811d343 100644
--- a/library/oid.c
+++ b/library/oid.c
@@ -954,6 +954,8 @@
     size_t encoded_len;
     unsigned int component1, component2;
 
+    /* First pass - parse the string to get the length of buffer required */
+
     ret = oid_parse_number(&component1, &str_ptr, str_bound);
     if (ret != 0) {
         return ret;
@@ -1014,7 +1016,9 @@
     }
     oid->len = encoded_len;
 
-    /* Now that we've allocated the buffer, go back to the start and encode */
+    /* Second pass - now that we've allocated the buffer, go back to the
+     * start and encode */
+
     str_ptr = oid_str;
     unsigned char *out_ptr = oid->p;
     unsigned char *out_bound = oid->p + oid->len;