~ubuntu-branches/ubuntu/trusty/monit/trusty-proposed

« back to all changes in this revision

Viewing changes to libmonit/src/util/Str.c

  • Committer: Package Import Robot
  • Author(s): Sergey B Kirpichev
  • Date: 2013-09-05 17:03:07 UTC
  • mfrom: (1.1.19)
  • Revision ID: package-import@ubuntu.com-20130905170307-ae94md1vagm60e41
Tags: 1:5.6-1
ImportedĀ UpstreamĀ versionĀ 5.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
385
385
int Str_lim(const char *s, int limit) {
386
386
        assert(limit>=0);
387
387
        if (s)
388
 
                for (; *s; s++) limit--;
389
 
        return (limit <= 0);
 
388
                for (; (*s && limit--); s++) ;
 
389
        return (limit < 0);
390
390
}
391
391
 
392
392