]> git.hungrycats.org Git - linux/commitdiff
[PATCH] trivial: scripts_kernel-doc: ignoring embedded structs shouldn't be
authorRusty Russell <trivial@rustcorp.com.au>
Sun, 11 Jul 2004 02:32:15 +0000 (19:32 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sun, 11 Jul 2004 02:32:15 +0000 (19:32 -0700)
From:  <adobriyan@mail.ru>

Imagine you have a code similar to

  struct foo {
   union {
   struct tcphdr   *th;
   } h;
   union {
   struct iphdr    *iph;
   } nh;
  };

kernel-doc in it's current state will happily eat everything from first '{' to
last '}' and nobody will see parameter 'h' in documentation (look at
include/linux/skbuff.h:struct sk_buff for real world example).

So, fix the greedy regexp.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
scripts/kernel-doc

index a331dfdb209f258bfb5b88097d8e0433790d852c..a8ec38b3903c3f17245a2d49e45f366e612cd338 100755 (executable)
@@ -1206,7 +1206,7 @@ sub dump_struct($$) {
         my $members = $3;
 
        # ignore embedded structs or unions
-       $members =~ s/{.*}//g;
+       $members =~ s/{.*?}//g;
 
        create_parameterlist($members, ';', $file);