yes, I agree to that, the point was not so much that CompareGuid is wrong then, 
but the way it's return value is being used in the specific cases of where the 
variable " IsFfs3Fv" is being used in FwVol.c, for instance:
       IsFfs3Fv = CompareGuid (&FwVolHeader->FileSystemGuid, 
&gEfiFirmwareFileSystem3Guid);
      if (!IsFfs3Fv) {
        DEBUG ((EFI_D_ERROR, "It is a FFS3 formatted file: %g in a non-FFS3 
formatted FV.\n", &(*FileHeader)->Name));
      }
is wrong.

the test should be      if (IsFfs3Fv) { 

furthermore, the variable name " IsFfs3Fv "  is misleading since it is true 
when 0, it is more like " IsNOTFfs3Fv" 



-----Original Message-----
If you think of it in relation to memcmp (stdlib) and CompareMem(EDKII), 
shouldn't CompareGuid behave the same way?  Return 0 if the inputs are equal.  
That is what I assume the original developers would have intended.

Thanks,

Garrett Kirkendall


-----Original Message-----
From: Miller, Carl H [mailto:carl.miller@...] 
Sent: Friday, December 14, 2012 12:31 PM
To: edk2-devel@...
Subject: [edk2] Reply to Tim's Message: 3 re: edk2-devel Digest, Vol 36, Issue 
29

Hi Tim,
I think it is more than just an error in the comment, if you pass in two 
identical guids to CompareGuid, it returns 0, not 1....

-----Original Message-----

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to