Peter Krempa
27dfb0280f
docs: hacking: Add good practices for shortening conditional expressions
...
Document that checking if a integer is (non-)zero should (not must)
avoid the shortened form that C allows as it may confuse readers into
overlooking the other possible values which might be interresting to
handle.
While pointers have distinct values from the point of view of the code
we only care whether it's non-NULL and thus it's documented it's okay
to shorten those.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
ACKed-by: Eric Blake <eblake@redhat.com>
2019-05-22 14:46:29 +02:00
..
2019-04-04 18:45:06 -04:00
2016-11-21 13:15:12 +01:00
2012-02-03 15:27:16 -07:00
2018-12-17 15:02:11 +00:00
2019-04-11 15:20:17 +01:00
2016-11-11 09:31:10 +00:00
2019-04-16 21:55:52 -05:00
2017-10-16 10:22:34 +01:00
2017-08-02 17:00:11 +01:00
2018-12-17 17:52:46 +01:00
2017-08-02 17:00:11 +01:00
2017-08-02 17:00:11 +01:00
2018-08-28 17:21:39 +02:00
2018-05-03 12:40:37 +01:00
2019-01-31 12:02:35 +01:00
2017-08-02 17:00:11 +01:00
2019-04-09 16:59:49 +02:00
2011-10-28 10:11:16 +01:00
2018-04-09 11:38:47 -06:00
2018-06-06 10:48:41 -04:00
2019-01-21 18:45:27 +00:00
2018-03-23 12:59:56 +01:00
2017-08-02 17:00:11 +01:00
2018-04-09 11:38:47 -06:00
2018-08-13 11:53:53 +02:00
2018-07-27 15:44:38 +02:00
2017-08-02 17:00:11 +01:00
2018-05-03 12:40:37 +01:00
2018-03-21 14:48:01 +00:00
2018-03-23 12:59:56 +01:00
2018-03-21 14:48:01 +00:00
2019-03-06 11:12:48 -05:00
2019-04-04 12:33:55 +01:00
2019-05-06 07:33:01 -04:00
2019-02-01 22:08:55 +04:00
2018-05-03 12:40:37 +01:00
2017-08-02 17:00:11 +01:00
2018-05-03 12:40:37 +01:00
2018-05-14 12:27:47 -04:00
2017-08-02 17:00:11 +01:00
2017-08-02 17:00:11 +01:00
2019-02-19 08:33:50 +01:00
2017-08-02 17:00:11 +01:00
2017-08-02 17:00:11 +01:00
2017-11-07 17:50:15 -05:00
2017-08-02 17:00:11 +01:00
2017-08-02 17:00:11 +01:00
2018-09-14 11:47:08 -06:00
2018-05-03 12:40:37 +01:00
2017-08-02 17:00:11 +01:00
2017-08-02 17:00:11 +01:00
2017-08-02 17:00:11 +01:00
2019-02-01 12:57:13 -05:00
2019-03-06 11:12:48 -05:00
2018-12-17 17:52:46 +01:00
2019-04-29 16:53:26 +02:00
2019-04-10 13:58:51 +02:00
2019-02-01 12:57:13 -05:00
2019-03-22 12:59:56 +03:00
2018-12-17 17:52:46 +01:00
2018-06-26 14:02:43 -04:00
2019-03-26 15:33:07 -05:00
2019-03-19 16:46:21 +01:00
2019-03-07 12:01:09 +01:00
2018-06-26 14:02:43 -04:00
2017-09-19 16:04:53 +02:00
2016-11-21 14:04:05 +01:00
2017-08-02 17:00:11 +01:00
2019-01-25 14:04:20 +01:00
2019-05-22 14:46:29 +02:00
2017-11-15 13:52:13 +01:00
2018-04-12 16:52:02 +01:00
2019-03-06 11:12:48 -05:00
2017-08-02 17:00:11 +01:00
2018-03-21 14:48:01 +00:00
2011-10-28 10:11:16 +01:00
2012-07-23 16:07:13 -06:00
2011-10-28 10:11:16 +01:00
2012-07-23 16:07:13 -06:00
2011-10-28 10:11:16 +01:00
2012-07-23 16:07:13 -06:00
2013-03-04 17:36:03 -05:00
2013-03-04 17:36:03 -05:00
2019-04-11 15:20:17 +01:00
2017-08-02 17:00:11 +01:00
2018-05-03 12:40:37 +01:00
2017-08-02 17:00:11 +01:00
2018-04-01 17:42:29 +02:00
2017-08-07 14:44:40 +01:00
2019-05-13 12:02:13 +02:00
2017-08-02 15:00:28 -04:00
2011-10-28 10:11:16 +01:00
2011-10-28 10:07:45 +01:00
2011-10-28 10:11:16 +01:00
2011-10-28 10:07:45 +01:00
2011-10-28 10:11:16 +01:00
2011-10-28 10:07:45 +01:00
2011-10-28 10:11:16 +01:00
2011-10-28 10:07:45 +01:00
2011-10-28 10:11:16 +01:00
2011-10-28 10:07:45 +01:00
2017-12-08 15:50:52 +01:00
2019-04-11 15:20:17 +01:00
2017-08-02 17:00:11 +01:00
2019-01-31 12:02:35 +01:00
2017-10-16 10:22:34 +01:00
2017-10-16 10:22:34 +01:00
2017-10-16 10:22:34 +01:00
2017-10-16 10:22:34 +01:00
2017-10-16 10:22:34 +01:00
2017-10-16 10:22:34 +01:00
2017-10-16 10:22:34 +01:00
2017-10-16 10:22:34 +01:00
2017-10-16 10:22:34 +01:00
2017-10-16 10:22:34 +01:00
2017-10-16 10:22:34 +01:00
2017-10-16 10:22:34 +01:00
2019-04-03 09:46:02 +02:00
2017-10-16 10:22:34 +01:00
2017-04-05 09:51:51 +02:00
2019-05-09 11:36:47 +01:00
2011-10-28 10:11:16 +01:00
2017-08-02 17:00:11 +01:00
2019-04-11 15:20:17 +01:00
2018-02-28 17:51:03 +00:00
2018-03-21 14:48:01 +00:00
2018-10-23 16:16:36 +01:00
2017-08-02 17:00:11 +01:00
2018-12-13 16:08:38 +00:00
2018-04-12 16:52:01 +01:00
2017-08-02 17:00:11 +01:00
2018-03-16 17:05:56 +00:00
2017-08-02 17:00:11 +01:00
2019-03-06 11:12:48 -05:00
2011-10-28 10:11:16 +01:00
2017-08-02 17:00:11 +01:00
2018-05-03 12:40:37 +01:00
2017-10-16 10:22:34 +01:00
2017-10-16 10:22:34 +01:00
2017-10-16 10:22:34 +01:00
2018-04-12 16:52:01 +01:00
2018-03-21 14:48:01 +00:00
2018-04-09 11:38:47 -06:00