X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Ffilenames.c;h=37d631d6ff311ba34c8a60124e30c564622e6072;hp=f1ea243012095d19eccf334e54e02ade3b59c089;hb=HEAD;hpb=f3c1eebfaf8526129ae6946cbcd44a3c602563d6 diff --git a/lib/filenames.c b/lib/filenames.c index f1ea2430..37d631d6 100644 --- a/lib/filenames.c +++ b/lib/filenames.c @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see http://www.gnu.org/licenses/ . + * along with this program. If not, see https://www.gnu.org/licenses/ . * * Author: Carl Worth */ @@ -46,7 +46,7 @@ notmuch_bool_t notmuch_filenames_valid (notmuch_filenames_t *filenames) { if (filenames == NULL) - return FALSE; + return false; return (filenames->iterator != NULL); } @@ -54,7 +54,7 @@ notmuch_filenames_valid (notmuch_filenames_t *filenames) const char * notmuch_filenames_get (notmuch_filenames_t *filenames) { - if (filenames->iterator == NULL) + if ((filenames == NULL) || (filenames->iterator == NULL)) return NULL; return filenames->iterator->string; @@ -63,7 +63,7 @@ notmuch_filenames_get (notmuch_filenames_t *filenames) void notmuch_filenames_move_to_next (notmuch_filenames_t *filenames) { - if (filenames->iterator == NULL) + if ((filenames == NULL) || (filenames->iterator == NULL)) return; filenames->iterator = filenames->iterator->next;