< Previous by Date | Date Index | Next by Date > |
< Previous in Thread | Thread Index | Next in Thread > |
In rutil/Errdes.hxx:
> +/*EMEDIUMTYPE 124 */ "EMEDIUMTYPE (Wrong medium type)", > +/*ECANCELED 125 */ "ECANCELED (Operation canceled)", > +/*ENOKEY 126 */ "ENOKEY (Required key not available)", > +/*EKEYEXPIRED 127 */ "EKEYEXPIRED (Key has expired)", > +/*EKEYREVOKED 128 */ "EKEYREVOKED (Key has been revoked)", > +/*EKEYREJECTED 129 */ "EKEYREJECTED (Key was rejected by service)", > +/*EOWNERDEAD 130 */ "EOWNERDEAD (Owner died)", > +/*ENOTRECOVERABLE 131 */ "ENOTRECOVERABLE (State not recoverable)", > +/*ERFKILL 132 */ "ERFKILL (Operation not possible due to RF-kill)", > +/*EHWPOISON 133 */ "EHWPOISON (Memory page has hardware error)", > +}; > +static const int NUM_MESSAGES_OS = sizeof(messagesOS)/sizeof(messagesOS[0]); > + > +static inline char* errortostringOS(int errnumOS) > +{ > + if (errnumOS < NUM_MESSAGES_OS)
I made some changes to code
static inline char* errortostringOS(int errnumOS)
{
if ( (errnumOS >= 0 ) && (errnumOS < NUM_MESSAGES_OS))
return messagesOS[errnumOS];
return "Unknown error";
}
It is not possible for errnumOS to be negative, please read these two answers
answer1 answer2
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.