(/home/sate/Testcases/c/cve/wireshark-1.2.0/gtk/filter_dlg.c) |
| |
| 806 | | | filter_dlg_save(filter_list_type_t list_type) |
| 807 | | | { |
| 808 | | | char *pf_dir_path; |
| 809 | | | char *f_path; |
| 810 | | | int f_save_errno; |
| 811 | | | const char *filter_type; |
| 812 | | | |
| 813 | | | switch (list_type) { |
| 814 | | | |
| 815 | | | case CFILTER_EDITED_LIST: |
| 816 | | | filter_type = "capture"; |
| 817 | | | list_type = CFILTER_LIST; |
| 818 | | | copy_filter_list(CFILTER_LIST, CFILTER_EDITED_LIST); |
| 819 | | | break; |
| 820 | | | |
| 821 | | | case DFILTER_EDITED_LIST: |
| 822 | | | filter_type = "display"; |
| 823 | | | list_type = DFILTER_LIST; |
| 824 | | | copy_filter_list(DFILTER_LIST, DFILTER_EDITED_LIST); |
| 825 | | | break; |
| 826 | | | |
| 827 | | | default: |
| 828 | | | g_assert_not_reached();
x /usr/include/glib-2.0/glib/gtestutils.h |
| |
73 | #define g_assert_not_reached() do { g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, NULL); } while (0) |
| |
x /usr/include/glib-2.0/glib/gmacros.h |
| |
160 | # define G_STRFUNC ((const char*) (__PRETTY_FUNCTION__)) |
| |
|
| 829 | | | filter_type = NULL; |
Unreachable Computation
The highlighted code will not execute under any circumstances. This may be because of: |
|
| 830 | | | break; |
| 831 | | | } |
| 832 | | | |
| 833 | | | |
| 834 | | | |
| 835 | | | if (create_persconffile_dir(&pf_dir_path) == -1) { |
| 836 | | | simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, |
| 837 | | | "Can't create directory\n\"%s\"\nfor filter files: %s.", |
| 838 | | | pf_dir_path, strerror(errno)); |
| 839 | | | g_free(pf_dir_path); |
| 840 | | | return; |
| 841 | | | } |
| 842 | | | |
| 843 | | | save_filter_list(list_type, &f_path, &f_save_errno); |
| 844 | | | if (f_path != NULL) { |
| 845 | | | |
| 846 | | | simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, |
| 847 | | | "Could not save to your %s filter file\n\"%s\": %s.", |
| 848 | | | filter_type, f_path, strerror(f_save_errno)); |
| 849 | | | g_free(f_path); |
| 850 | | | } |
| 851 | | | } |
| |