Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #11

Merged
merged 9 commits into from Oct 22, 2012
Merged

Fixes #11

merged 9 commits into from Oct 22, 2012

Commits on Oct 19, 2012

  1. genl/family flags can be damaged during the auto-indentation.

    "-" was never used in the names of the flags. "_" was used in all places
    of the library. So, I just changed the undescore to the minus.
    
    Automatic indentation can insert spaces on either side of the minus,
    so the library will be compiled, but will not be usable (in this part of the code),
    as the parser will split words by white space, and the flag "admin - perm"
    will never work.
    socketpair committed Oct 19, 2012
    Configuration menu
    Copy the full SHA
    787f14d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fedb862 View commit details
    Browse the repository at this point in the history
  3. Clang diagnostics

    Based on clang diagnostics:
    
    1. lib/nl.c: recvmsgs(): nla filling with zeros commented.
    2. lib/route/classid.c: & lib/route/pktloc.c:
       remove zero-filling of struct stat
    3. lib/route/qdisc/htb.c: Fix htb_qdisc_msg_fill(): fix zero-filling
    4. ematch/container.c: container_parse:
       commented why only 4 bytes are copied
       len marked as unused to eliminate compiler warning
    socketpair committed Oct 19, 2012
    Configuration menu
    Copy the full SHA
    e1b67fb View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e7ec197 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9d6b104 View commit details
    Browse the repository at this point in the history
  6. nl_recv(): Memory allocation errors are handled properly now

    1. all cleanup actions (like free()) now located at the end of function
    2. in case of error or EOF, *buf and *creds (if given) set to NULL
       This protect from invalid code at user's side, like:
       char *buf;
       x = nl_recv(..., &buf, ...);
       if (x<=0)
          goto cleanup;
       cleanup:
          free(buf);
    3. all intermediate buffers are stored into local variables, and user's
       variables only touches at the end.
    socketpair committed Oct 19, 2012
    Configuration menu
    Copy the full SHA
    6946851 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    2249eae View commit details
    Browse the repository at this point in the history
  8. nl_recv(): small code cleanups

    1. memset around nla is unnecessary
    2. calloc() is unnecessary. malloc() used instead.
    socketpair committed Oct 19, 2012
    Configuration menu
    Copy the full SHA
    da694e6 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    420e462 View commit details
    Browse the repository at this point in the history