aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2019-11-18 10:17:34 -0600
committertlatorre <tlatorre@uchicago.edu>2019-11-18 10:17:34 -0600
commit0711635a7449707c4e77ff1073856781aa309995 (patch)
tree21be19d0eb25983ad5d40e1a2ec1a733feb82d59
parent1e8a95d76fd30fcf4ba3949fc63a5e6ce9ec8d52 (diff)
downloadsddm-0711635a7449707c4e77ff1073856781aa309995.tar.gz
sddm-0711635a7449707c4e77ff1073856781aa309995.tar.bz2
sddm-0711635a7449707c4e77ff1073856781aa309995.zip
size_t -> int in is_slot_early()
This commit updates the crate, card, and channel variables in is_slot_early() to be ints instead of size_ts. The reason is I saw a warning when building with clang and realized that the abs(card - flasher_card) == 1 check wasn't working if flasher_card was 1 greater than card because I was using unsigned ints.
-rw-r--r--src/dc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dc.c b/src/dc.c
index 05a8010..0dadfc7 100644
--- a/src/dc.c
+++ b/src/dc.c
@@ -683,8 +683,8 @@ int is_slot_early(event *ev, int flasher_pmt_id)
double flasher_pos[3];
double pmt_dir[3];
double distance;
- size_t crate, card, channel;
- size_t flasher_crate, flasher_card, flasher_channel;
+ int crate, card, channel;
+ int flasher_crate, flasher_card, flasher_channel;
flasher_crate = flasher_pmt_id/512;
flasher_card = (flasher_pmt_id % 512)/32;