> I did notice, though, that we're not having the same care about
> returning 'rv', as you had with the testcases drivers (rv % 256). But

  True, I have yet another patch to pkcsconf coming, so I'll add this code in 
it.
 
> I'm also wonder about the construct you've used. Help me here:
> 
> /* make sure we return non-zero if rv is non-zero */
> return ((rv==0) || (rv % 256) ? rv : -1);
> 
> wouldn't the above means that every CKR code that is divisible by 256
> should make the main function return zero (after all, main() will
> report to shell it's "return value %2 256")?

The trick here is that if rv==256, (rv % 256)==0, which makes the conditional 
false...

Kent
 
>  -Klaus
> 



------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Opencryptoki-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opencryptoki-tech

Reply via email to