Skip to content

attr_fn_tv.c:339: bad compare ? #471

Description

@dcb314

gcc can be made to say:

attr_fn_tv.c:339:14: warning: duplicated 'if' condition [-Wduplicated-cond]

Source code is

    if (attr->at_val.at_timeval.tv_usec < with->at_val.at_timeval.tv_usec)
      {
            return(-1);
      }
    else if (attr->at_val.at_timeval.tv_usec < with->at_val.at_timeval.tv_usec)

Clearly, the second "<" should be ">"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions