X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=src%2Ftrackfds.h;h=c75508677c267c98ca1a34e2bcb0d41ee277ec59;hb=24ead2ee7fc7509afe4bfcc15b1c1b06177cf1f3;hp=243e8e0d62d33d6f563d525c4f892a92a99ea25d;hpb=291a1432675964b3f9d4169850ce9d5addbba587;p=coloredstderr%2Fcoloredstderr.git diff --git a/src/trackfds.h b/src/trackfds.h index 243e8e0..c755086 100644 --- a/src/trackfds.h +++ b/src/trackfds.h @@ -1,7 +1,7 @@ /* * Utility functions to track file descriptors. * - * Copyright (C) 2013 Simon Ruderich + * Copyright (C) 2013-2014 Simon Ruderich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -402,7 +402,7 @@ inline static int tracked_fds_find(int fd) { return 0; } - if (fd < TRACKFDS_STATIC_COUNT) { + if (likely(fd < TRACKFDS_STATIC_COUNT)) { return tracked_fds[fd]; }