(2013/10/18 23:44), Hemant Kumar wrote:[...]
+int show_sdt_notes(const char *target)Hmm, why don't you check the ret first? And I think the
+{
+ int ret;
+ LIST_HEAD(sdt_notes);
+
+ ret = get_sdt_note_list(&sdt_notes, target);
+ if (!list_empty(&sdt_notes)) {
+ if (!ret)
empty check should be done in display_sdt_note_info() and
cleanup_sdt_note_list() (anyway, since both uses list_for_each*()
it is already done).
+ display_sdt_note_info(&sdt_notes);Others are good for me. :)
+ cleanup_sdt_note_list(&sdt_notes);
+ }
+ return ret;
+}