sial.c's apigetctype

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi:
     I found some codes like
     case TYPE_CODE_ENUM:    if(sial_is_enum(ctype))     goto match; break;
I wonder that whether it would be better if these codes could be changed as
following:

Signed-off-by: Bai Weidong <baiwd@xxxxxxxxxxxxxx>

--- crash-4.0-4.12/extensions/sial.c    2007-12-13 02:48:09.000000000 +0800
+++ crash-4.0-4.12/extensions/sial.new.c        2008-01-10 16:47:15.000000000 +0800
@@ -155,10 +155,10 @@ apigetctype(int ctype, char *name, TYPE_
        if(sial_is_typedef(ctype) && v) goto match;
        switch(TYPE_CODE(type)) {
            case TYPE_CODE_TYPEDEF: case TYPE_CODE_INT:
-                                    if(sial_is_typedef(ctype))  goto match; break;
-            case TYPE_CODE_ENUM:    if(sial_is_enum(ctype))     goto match; break;
-            case TYPE_CODE_STRUCT:  if(sial_is_struct(ctype))   goto match; break;
-            case TYPE_CODE_UNION:   if(sial_is_union(ctype))    goto match; break;
+                                    if(sial_is_typedef(ctype))  goto match;
+            case TYPE_CODE_ENUM:    if(sial_is_enum(ctype))     goto match;
+            case TYPE_CODE_STRUCT:  if(sial_is_struct(ctype))   goto match;
+            case TYPE_CODE_UNION:   if(sial_is_union(ctype))    goto match;
        }
        sial_dbg_named(DBG_TYPE, name, 2, "Found but no match.\n");
    }

Best Regards
Bai Weidong

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility

[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux