mirror of
https://github.com/cryb-to/cryb-to.git
synced 2024-12-25 14:01:07 +00:00
Don't rely on side effects between sequence points
This commit is contained in:
parent
f04b77e2a5
commit
0995671d43
1 changed files with 3 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
/*-
|
||||
* Copyright (c) 2014 Dag-Erling Smørgrav
|
||||
* Copyright (c) 2014-2015 Dag-Erling Smørgrav
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -256,7 +256,8 @@ t_string_trunc(char **desc CRYB_UNUSED, void *arg CRYB_UNUSED)
|
|||
int ret;
|
||||
|
||||
s = string_dup_cs(T_MAGIC_STR, SIZE_MAX);
|
||||
ret = t_compare_ssz(T_MAGIC_LEN, len = string_len(s)) &
|
||||
len = string_len(s);
|
||||
ret = t_compare_ssz(T_MAGIC_LEN, len) &
|
||||
t_compare_ssz(len, string_trunc(s, SIZE_MAX)) &
|
||||
t_compare_ssz(len, string_trunc(s, len + 1)) &
|
||||
t_compare_ssz(len, string_trunc(s, len)) &
|
||||
|
|
Loading…
Reference in a new issue