Re: [PATCH 1/7] reg: Add system error printing function
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I conceptually like this function. Am 2014-11-04 21:15, schrieb Jonathan Vollebregt:
+static int reg_print_error(LONG error_code) You are mixing LSTATUS and LONG in your code. It seems like this is ultimately Microsoft's fault since it defines LSTATUS in reg.h but puts error values from winerror.h into it. Since LSTATUS is defined as LONG it is not a big deal, but please pick one and try to be consistent. My choice would be LSTATUS since it is returned from the registry functions, but if you have a reason to choose LONG that's OK with me.
+ case ERROR_FILE_NOT_FOUND: + return reg_message(STRING_CANNOT_FIND); + case ERROR_BADKEY: + return reg_message(STRING_INVALID_KEY); These are dead code, please add them in the patches that call them.
+ STRING_ERROR, "Error: " Wouldn't "Unexpected error" be a better fit?
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJUWT4tAAoJEN0/YqbEcdMw3bwP/1//Ah6I2lrHnd0SnJ8m83IM yyrD6D1hL3njOFPCLFykdEbrjf+yDkz1Qi596L/qUbvkK9rbVEo4EtUgtHeJ/D+/ UF7Jr0oB8RWDQZh5ePt+Ns0x9BYUwqbi/fyOda+Xtz0P+Vl3FUH5K3U3OO5cYtlB S52bruK/Bv69FsRQwFwN9vYRX+JnJJq3NJ9Q2xoywBN26iypgTa+SDdKxA9gcDK1 xIfvSDqYsqR5Rq6UnRzroknG0j0aeuDWgHwY5pF1/DxGTbir5wCs6UOVPstIQeqk VxjrInXjGXo4LmJHz+6KPVc3+WuKr5QsmQr9Z/NgZBLN7xJXJ4DY19keFhUQfsLB AjAvf+mJy8GRwoaCihboze9ltQywoM0jZe2zLRxYiiXmD79EDN2huKi9D8g+ur58 0OE37veRYh6IUhjzQvfTxdNZvkNnPxvvP+S51qVEQu6GWPjITe375mQf8HIV3AZO z+NV3TWgsiz/tMqQK5YCPq9oR8vuXzu7H4RBjdUUpKy5yTzEcXSw6ehqj2Qehz5I MTC7QBQVNxHD3MFHGCoPA7Oeb8J2IEDGgZlj9cq9TSLTfy9XOlPQ8Abth29I/fjl GW/9Z10VGQ9F+KQ7E5E0V+Sci93l486Dv2gf579ZYmCa8sfPI7BVj1SQmkOY3bQP i3Ekbq0hR2Yk1FQcciYG =iN7/ -----END PGP SIGNATURE-----
participants (1)
-
Stefan Dösinger