Print this page
Extra lint fixes

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/inotify.c
          +++ new/usr/src/uts/common/io/inotify.c
↓ open down ↓ 621 lines elided ↑ open up ↑
 622  622                  avl_create(&watch->inw_children,
 623  623                      (int(*)(const void *, const void *))inotify_watch_cmpvp,
 624  624                      sizeof (inotify_watch_t),
 625  625                      offsetof(inotify_watch_t, inw_byvp));
 626  626          } else {
 627  627                  VERIFY(name != NULL);
 628  628                  inotify_watch_hold(parent);
 629  629                  watch->inw_mask &= IN_CHILD_EVENTS;
 630  630                  watch->inw_parent = parent;
 631  631                  watch->inw_name = kmem_alloc(strlen(name) + 1, KM_SLEEP);
 632      -                strcpy(watch->inw_name, name);
      632 +                /* strcpy() is safe, because strlen(name) bounds us. */
      633 +                (void) strcpy(watch->inw_name, name);
 633  634  
 634  635                  avl_add(&parent->inw_children, watch);
 635  636          }
 636  637  
 637  638          /*
 638  639           * Add our monitor to the vnode.  We must not have the watch lock held
 639  640           * when we do this, as it will immediately hold our watch.
 640  641           */
 641  642          err = fem_install(vp, inotify_femp, watch, OPARGUNIQ,
 642  643              (void (*)(void *))inotify_watch_hold,
↓ open down ↓ 862 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX