Assigning 64-bit errcode_t to 32-bit krb5_error_code

Greg Hudson ghudson at
Fri Dec 5 12:02:08 EST 2014

On 12/05/2014 05:42 AM, Tomas Kuthan wrote:
> Is there anything (besides common sense) forbidding errcode_t values 
> overflowing 32-bit integer?

errcode_t and krb5_error_code are both intended to hold com_err codes,
which are 32-bit values.  A profile plugin module could return a larger
value, but it would be incorrect to do so.

The type "long" was chosen for errcode_t at a time when there were
platforms with 16-bit ints to worry about, and there were no C99
fixed-width types to take advantage of.

More information about the krbdev mailing list