@@ -835,66 +835,96 @@ print_status(pcmk__output_t *out, pe_working_set_t *data_set,
835835
836836 /* Print resources section, if needed */
837837 if (is_set (show , mon_show_resources )) {
838- rc = print_resources (out , data_set , print_opts , mon_ops ,
839- is_set (mon_ops , mon_op_print_brief ), TRUE,
840- rc == pcmk_rc_ok );
838+ int x = print_resources (out , data_set , print_opts , mon_ops ,
839+ is_set (mon_ops , mon_op_print_brief ), TRUE,
840+ rc == pcmk_rc_ok );
841+ if (x == pcmk_rc_ok ) {
842+ rc = pcmk_rc_ok ;
843+ }
841844 }
842845
843846 /* print Node Attributes section if requested */
844847 if (is_set (show , mon_show_attributes )) {
845- rc = print_node_attributes (out , data_set , mon_ops ,
846- rc == pcmk_rc_ok );
848+ int x = print_node_attributes (out , data_set , mon_ops ,
849+ rc == pcmk_rc_ok );
850+ if (x == pcmk_rc_ok ) {
851+ rc = pcmk_rc_ok ;
852+ }
847853 }
848854
849855 /* If requested, print resource operations (which includes failcounts)
850856 * or just failcounts
851857 */
852858 if (is_set (show , mon_show_operations ) || is_set (show , mon_show_failcounts )) {
853- rc = print_node_summary (out , data_set , is_set (show , mon_show_operations ),
854- mon_ops , rc == pcmk_rc_ok );
859+ int x = print_node_summary (out , data_set , is_set (show , mon_show_operations ),
860+ mon_ops , rc == pcmk_rc_ok );
861+ if (x == pcmk_rc_ok ) {
862+ rc = pcmk_rc_ok ;
863+ }
855864 }
856865
857866 /* If there were any failed actions, print them */
858867 if (is_set (show , mon_show_failures ) && xml_has_children (data_set -> failed )) {
859- rc = print_failed_actions (out , data_set , rc == pcmk_rc_ok );
868+ int x = print_failed_actions (out , data_set , rc == pcmk_rc_ok );
869+ if (x == pcmk_rc_ok ) {
870+ rc = pcmk_rc_ok ;
871+ }
860872 }
861873
862874 /* Print failed stonith actions */
863875 if (is_set (show , mon_show_fence_failed ) && is_set (mon_ops , mon_op_fence_history )) {
864876 for (stonith_history_t * hp = stonith_history ; hp ; hp = hp -> next ) {
865877 if (hp -> state == st_failed ) {
866- rc = out -> message (out , "failed-fencing-history" , hp ,
867- is_set (mon_ops , mon_op_fence_full_history ), rc = pcmk_rc_ok );
878+ int x = out -> message (out , "failed-fencing-history" , hp ,
879+ is_set (mon_ops , mon_op_fence_full_history ), rc = pcmk_rc_ok );
880+ if (x == pcmk_rc_ok ) {
881+ rc = pcmk_rc_ok ;
882+ }
883+
868884 break ;
869885 }
870886 }
871887 }
872888
873889 /* Print tickets if requested */
874890 if (is_set (show , mon_show_tickets )) {
875- rc = print_cluster_tickets (out , data_set , rc == pcmk_rc_ok );
891+ int x = print_cluster_tickets (out , data_set , rc == pcmk_rc_ok );
892+ if (x == pcmk_rc_ok ) {
893+ rc = pcmk_rc_ok ;
894+ }
876895 }
877896
878897 /* Print negative location constraints if requested */
879898 if (is_set (show , mon_show_bans )) {
880- rc = print_neg_locations (out , data_set , mon_ops , prefix , rc == pcmk_rc_ok );
899+ int x = print_neg_locations (out , data_set , mon_ops , prefix , rc == pcmk_rc_ok );
900+ if (x == pcmk_rc_ok ) {
901+ rc = pcmk_rc_ok ;
902+ }
881903 }
882904
883905 /* Print stonith history */
884906 if (is_set (mon_ops , mon_op_fence_history )) {
885907 if (is_set (show , mon_show_fence_worked )) {
886908 for (stonith_history_t * hp = stonith_history ; hp ; hp = hp -> next ) {
887909 if (hp -> state != st_failed ) {
888- rc = out -> message (out , "fencing-history" , hp ,
889- is_set (mon_ops , mon_op_fence_full_history ), rc == pcmk_rc_ok );
910+ int x = out -> message (out , "fencing-history" , hp ,
911+ is_set (mon_ops , mon_op_fence_full_history ), rc == pcmk_rc_ok );
912+ if (x == pcmk_rc_ok ) {
913+ rc = pcmk_rc_ok ;
914+ }
915+
890916 break ;
891917 }
892918 }
893919 } else if (is_set (show , mon_show_fence_pending )) {
894920 for (stonith_history_t * hp = stonith_history ; hp ; hp = hp -> next ) {
895921 if (hp -> state != st_failed && hp -> state != st_done ) {
896- rc = out -> message (out , "pending-fencing-actions" , hp ,
897- is_set (mon_ops , mon_op_fence_full_history ), rc == pcmk_rc_ok );
922+ int x = out -> message (out , "pending-fencing-actions" , hp ,
923+ is_set (mon_ops , mon_op_fence_full_history ), rc == pcmk_rc_ok );
924+ if (x == pcmk_rc_ok ) {
925+ rc = pcmk_rc_ok ;
926+ }
927+
898928 break ;
899929 }
900930 }
0 commit comments