summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2018-09-25 10:39:13 -0700
committerH. Peter Anvin <hpa@zytor.com>2018-09-25 10:39:13 -0700
commitc089fccb5342796d363344575fd1dc5ee6caf05d (patch)
tree17c9f40bc7a98d5340f0a8a82aba9bf5b6ae1eaa
parentb08c4b8ae65eee5ed6ba2b653f53ba488c8f7167 (diff)
downloadabc80sim-vsync.tar.gz
abc80sim-vsync.tar.xz
abc80sim-vsync.zip
sdlscrn.c: unlikely() around error conditionvsync
-rw-r--r--sdlscrn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sdlscrn.c b/sdlscrn.c
index 7862ad5..7018277 100644
--- a/sdlscrn.c
+++ b/sdlscrn.c
@@ -155,7 +155,7 @@ static void unlock_screen(struct surface *s)
{
if (s->lock_count > 0)
SDL_UnlockSurface(s->surf);
- else if (s->lock_count < 0)
+ else if (unlikely(s->lock_count < 0))
abort(); /* SHOULD NEVER HAPPEN */
s->lock_count--;