libosmocore.git branch master updated. 0.9.6-142-g7c1ec8c

gitosis at osmocom.org gitosis at osmocom.org
Wed Mar 15 13:47:36 UTC 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "An utility library for Open Source Mobile Communications".

The branch, master has been updated
       via  7c1ec8c8e763f9ab59f0de3ee25d2cd325d7480e (commit)
      from  6761c3f6268909d2bbb7c7e3dd85addc8004671e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cgit.osmocom.org/libosmocore/commit/?id=7c1ec8c8e763f9ab59f0de3ee25d2cd325d7480e

commit 7c1ec8c8e763f9ab59f0de3ee25d2cd325d7480e
Author: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Date:   Thu Mar 2 14:32:52 2017 +0100

    ctrl_type_vals: explicitly terminate
    
    Don't use CTRL_TYPE_UNKNOWN as value_string[] terminator, use an explicit, more
    obvious { 0, NULL } termination. Set an explicit string for CTRL_TYPE_UNKNOWN.
    No other value_string[]s to date have such a "hidden" terminator.
    
    BTW, a { 0, "string" } item is not a terminator, only { 0, NULL } is, so we can
    set a string for CTRL_TYPE_UNKNOWN == 0.
    
    Also, having a string value for CTRL_TYPE_UNKNOWN is not harmful because all
    code paths explicitly check for the CTRL_TYPE_*s that are valid.
    
    Adjust the test expectation.
    
    From the ctrl_type_vals enum, remove the = 0, because it is implicitly 0
    anyway.
    
    One motivation to press this fixup: I am trying to add a script that checks
    whether all value_string[]s are terminated to our jenkins jobs, and to find
    that this one is terminated, it would need to interpret the CTRL_TYPE_UNKNOWN
    constant, which would make things far more complex. At this point, all of the
    value_string[]s have an explicit termination, and I would like to enforce this
    from now on -- for readable code and to not spend more time on the validator.
    
    The patch adding ctrl_type_vals (Icd4e96dd9f00876cb70b43cfcf42ab4f10311b28) was
    accepted by another reviewer before I could reconfirm my -1, so this is a fixup
    to enable the termination checking script patches.
    
    Related: I2bc93ab4781487e7685cfb63091a489cd126b1a8 (adds script to libosmocore)
             I7fe3678b524d602fc6aa14bc0ed06308df809a3e (uses in jenkins.sh)
             Icd4e96dd9f00876cb70b43cfcf42ab4f10311b28 (adds ctrl_type_vals)
    
    Change-Id: Ia99f37464c7b36b587da2cc78f52c82725f02cbc

-----------------------------------------------------------------------

Summary of changes:
 include/osmocom/ctrl/control_cmd.h | 2 +-
 src/ctrl/control_cmd.c             | 3 ++-
 tests/ctrl/ctrl_test.ok            | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
An utility library for Open Source Mobile Communications



More information about the osmocom-commitlog mailing list