Thread (61 messages) flat view 61 messages, 4 authors, 2016-06-15

Re: [PATCH 07/21] Copy the remaining differences from verify_tag() to parse_tag_buffer_internal()

From: Johan Herland <hidden>
Date: 2016-06-15 22:43:15

On Saturday 09 June 2007, Alex Riesen wrote:
On 6/9/07, Johan Herland [off-list ref] wrote:
quoted
+               /* Verify the tag-name: we don't allow control characters or spaces in it */
+               for (i = 4;;) {
+                       unsigned char c = tag_line[i++];
+                       if (c == '\n')
+                               break;
+                       if (c > ' ')
+                               continue;
+                       return error("char" PD_FMT ": could not verify tag name", tag_line + i - data);
+               }
This looks very familiar. Haven't you just made a very useless patch
which had this very same code? How about putting it in its own
function and just call it from these two places? And what problem
do you have with pointers?!
I just answered your comment on the previous patch, and that answer should
apply here as well.

I'm probably splitting this up into too small pieces, since I keep getting
comments that fail to see the overall picture of what I'm trying to do,
namely taking two similar pieces of code and slowly unifying them to the
point where I can replace one of them by a call to the other (see the two
next patches).

Hope this helps,


...Johan

-- 
Johan Herland, [off-list ref]
www.herland.net
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help