I tests.c line 5092 you state that tweaking with zero returns 1 (success) and leaves the seckey unchanged - this is what really happens
/* Tweak of zero leaves the value unchanged. */
memset(ctmp2, 0, 32);
CHECK(secp256k1_ec_seckey_tweak_add(ctx, ctmp, ctmp2) == 1);
In documentation however for ec_seckey_tweak_add in secp256k1.h you state that:
* In: tweak32: pointer to a 32-byte tweak. If the tweak is invalid according to
* secp256k1_ec_seckey_verify, this function returns 0. For
* uniformly random 32-byte arrays the chance of being invalid
* is negligible (around 1 in 2^128).
*/
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_seckey_tweak_add(
which does not make any sense as 32 long byte string of zeros is invalid according to ec_seckey_verify, yet in this function it returns one - success - and key is not tweaked.
Confusing...