OSDN Git Service

glapi: minor cosmetic for _glapi_add_dispatch
authorGeorge Sapountzis <gsapountzis@gmail.com>
Sun, 7 Mar 2010 23:58:59 +0000 (01:58 +0200)
committerGeorge Sapountzis <gsapountzis@gmail.com>
Wed, 10 Mar 2010 16:44:46 +0000 (18:44 +0200)
src/mesa/glapi/glapi_getproc.c

index 95974fe..1badff8 100644 (file)
@@ -472,20 +472,21 @@ _glapi_add_dispatch( const char * const * function_names,
    }
 
    for ( i = 0 ; function_names[i] != NULL ; i++ ) {
-      if (! is_static[i] ) {
+      if (is_static[i]) {
+        continue;
+      }
+
+      if (entry[i] == NULL) {
+        entry[i] = add_function_name( function_names[i] );
         if (entry[i] == NULL) {
-           entry[i] = add_function_name( function_names[i] );
-           if (entry[i] == NULL) {
-              /* FIXME: Possible memory leak here.
-               */
-              return -1;
-           }
+           /* FIXME: Possible memory leak here. */
+           return -1;
         }
-
-        set_entry_info( entry[i], real_sig, offset );
       }
+
+      set_entry_info( entry[i], real_sig, offset );
    }
-   
+
    return offset;
 }