diff options
author | Max <msuraev@sysmocom.de> | 2018-02-05 12:57:06 +0100 |
---|---|---|
committer | Max <msuraev@sysmocom.de> | 2018-02-05 12:57:06 +0100 |
commit | 98f7467ac8ba53230d4ae6167aa5664a105323b3 (patch) | |
tree | 2beb1d76dce3353b57d31ae9303254ad6e22465d /src/libmsc/sms_queue.c | |
parent | c2007855cebd240cf2868ce0d2dd90ba42ddfa8a (diff) |
Wrap osmo_strlcpy() calls
Using following semantic patch:
@@ expression A, B, C; @@
- osmo_strlcpy(A, B, sizeof(A));
+ OSMO_STRLCPY_ARRAY(A, B);
Which was applied using following command:
spatch --dir src -I src --sp-file strlcpy.spatch --in-place --recursive-includes
All the calls to osmo_strlcpy() which use destination buffer obtained
via sizeof() were replaced with the corresponding wrapper macro.
Change-Id: I67b482dedfa11237ac21894fc5930039e12434ab
Related: OS#2864
Diffstat (limited to 'src/libmsc/sms_queue.c')
-rw-r--r-- | src/libmsc/sms_queue.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libmsc/sms_queue.c b/src/libmsc/sms_queue.c index 163d4c722..39a81f6ac 100644 --- a/src/libmsc/sms_queue.c +++ b/src/libmsc/sms_queue.c @@ -205,8 +205,7 @@ struct gsm_sms *smsq_take_next_sms(struct gsm_network *net, int sanity = 100; char started_with_msisdn[last_msisdn_buflen]; - osmo_strlcpy(started_with_msisdn, last_msisdn, - sizeof(started_with_msisdn)); + OSMO_STRLCPY_ARRAY(started_with_msisdn, last_msisdn); while (wrapped < 2 && (--sanity)) { /* If we wrapped around and passed the first msisdn, we're |