Converted a few "x != NULL" tests to "x" for clarity.
authorRichard Rauch <rkr@olib.org>
Mon, 27 Oct 2003 15:38:14 +0000 (15:38 +0000)
committerRichard Rauch <rkr@olib.org>
Mon, 27 Oct 2003 15:38:14 +0000 (15:38 +0000)
I think that I've touched enough lines of source for one morning.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@253 7f0cb862-5218-0410-a997-914c9d46530a

src/freeglut_menu.c

index c9feea2..f49ca52 100644 (file)
@@ -861,15 +861,15 @@ void FGAPIENTRY glutChangeToSubMenu( int item, const char* label, int subMenuID
     SFG_MenuEntry* menuEntry = NULL;
 
     freeglut_assert_ready;
-    freeglut_return_if_fail( fgStructure.Menu != NULL );
-    freeglut_return_if_fail( subMenu != NULL );
+    freeglut_return_if_fail( fgStructure.Menu );
+    freeglut_return_if_fail( subMenu );
     menuEntry = fghFindMenuEntry( fgStructure.Menu, item );
-    freeglut_return_if_fail( menuEntry != NULL );
+    freeglut_return_if_fail( menuEntry );
 
     /*
      * We want it to become a sub menu entry, so:
      */
-    if( menuEntry->Text != NULL )
+    if( menuEntry->Text )
         free( menuEntry->Text );
 
     menuEntry->Text = strdup( label );
@@ -889,7 +889,7 @@ void FGAPIENTRY glutRemoveMenuItem( int item )
     freeglut_assert_ready;
     freeglut_return_if_fail( fgStructure.Menu );
     menuEntry = fghFindMenuEntry( fgStructure.Menu, item );
-    freeglut_return_if_fail( menuEntry != NULL );
+    freeglut_return_if_fail( menuEntry );
     fgListRemove( &fgStructure.Menu->Entries, &menuEntry->Node );
     free( menuEntry->Text );
     free( menuEntry );