Hi!
https://fedorahosted.org/sssd/ticket/2641
I know the ticket talks about macro, but if nobody is against, i would prefer inline function.
Michal
On 06/24/2015 06:46 PM, Michal Židek wrote:
+static inline bool is_default_view(const char *view_name) +{
- /* NULL is treated as default */
- if (view_name == NULL
|| strcmp(view_name, SYSDB_DEFAULT_VIEW_NAME) == 0) {
return true;
- } else {
return false;
- }
+}
Do you think that { return view_name == NULL || strcmp(view_name,SYSDB_DEFAULT_VIEW_NAME) == 0; }
would be harder to read? (I'm just asking I'm not giving nack.)
On Thu, Jun 25, 2015 at 11:05:28AM +0200, Pavel Reichl wrote:
On 06/24/2015 06:46 PM, Michal Židek wrote:
+static inline bool is_default_view(const char *view_name) +{
- /* NULL is treated as default */
- if (view_name == NULL
|| strcmp(view_name, SYSDB_DEFAULT_VIEW_NAME) == 0) {
return true;
- } else {
return false;
- }
+}
Do you think that { return view_name == NULL || strcmp(view_name,SYSDB_DEFAULT_VIEW_NAME) == 0; }
would be harder to read? (I'm just asking I'm not giving nack.)
To me, the explicit true and false returns are easier.
On 06/25/2015 01:57 PM, Jakub Hrozek wrote:
On Thu, Jun 25, 2015 at 11:05:28AM +0200, Pavel Reichl wrote:
On 06/24/2015 06:46 PM, Michal Židek wrote:
+static inline bool is_default_view(const char *view_name) +{
- /* NULL is treated as default */
- if (view_name == NULL
|| strcmp(view_name, SYSDB_DEFAULT_VIEW_NAME) == 0) {
return true;
- } else {
return false;
- }
+}
Do you think that { return view_name == NULL || strcmp(view_name,SYSDB_DEFAULT_VIEW_NAME) == 0; }
would be harder to read? (I'm just asking I'm not giving nack.)
To me, the explicit true and false returns are easier.
OK, then please ignore my comment.
sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
On 06/24/2015 06:46 PM, Michal Židek wrote:
Hi!
https://fedorahosted.org/sssd/ticket/2641
I know the ticket talks about macro, but if nobody is against, i would prefer inline function.
Michal
sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
Patch LGTM,
ci passed: http://sssd-ci.duckdns.org/logs/job/18/27/summary.html
ACK
Thanks!
On Mon, Jun 29, 2015 at 03:43:00PM +0200, Pavel Reichl wrote:
On 06/24/2015 06:46 PM, Michal Židek wrote:
Hi!
https://fedorahosted.org/sssd/ticket/2641
I know the ticket talks about macro, but if nobody is against, i would prefer inline function.
Michal
sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
Patch LGTM,
ci passed: http://sssd-ci.duckdns.org/logs/job/18/27/summary.html
ACK
Thanks!
* master: 9ac2a33f4cdc4941fa63118dcffe8058854f33c4
Sorry about the delay in pushing.
sssd-devel@lists.fedorahosted.org