@@ -889,27 +889,24 @@ static void device_propagate_reload_by_sysfs(Manager *m, const char *sysfs) {
889889 }
890890}
891891
892- static int device_remove_old (Manager * m , sd_device * dev ) {
892+ static void device_remove_old_on_move (Manager * m , sd_device * dev ) {
893893 _cleanup_free_ char * syspath_old = NULL , * e = NULL ;
894894 const char * devpath_old ;
895895 int r ;
896896
897897 r = sd_device_get_property_value (dev , "DEVPATH_OLD" , & devpath_old );
898- if (r < 0 ) {
899- log_device_debug_errno (dev , r , "Failed to get DEVPATH_OLD= property on 'move' uevent, ignoring: %m" );
900- return 0 ;
901- }
898+ if (r < 0 )
899+ return (void ) log_device_debug_errno (dev , r , "Failed to get DEVPATH_OLD= property on 'move' uevent, ignoring: %m" );
902900
903901 syspath_old = path_join ("/sys" , devpath_old );
904902 if (!syspath_old )
905- return log_oom ();
903+ return ( void ) log_oom ();
906904
907905 r = unit_name_from_path (syspath_old , ".device" , & e );
908906 if (r < 0 )
909- return log_device_error_errno (dev , r , "Failed to generate unit name from old device path: %m" );
907+ return ( void ) log_device_error_errno (dev , r , "Failed to generate unit name from old device path: %m" );
910908
911909 device_update_found_by_sysfs (m , syspath_old , 0 , DEVICE_FOUND_UDEV |DEVICE_FOUND_MOUNT |DEVICE_FOUND_SWAP );
912- return 0 ;
913910}
914911
915912static int device_dispatch_io (sd_device_monitor * monitor , sd_device * dev , void * userdata ) {
@@ -937,7 +934,7 @@ static int device_dispatch_io(sd_device_monitor *monitor, sd_device *dev, void *
937934 device_propagate_reload_by_sysfs (m , sysfs );
938935
939936 if (action == SD_DEVICE_MOVE )
940- ( void ) device_remove_old (m , dev );
937+ device_remove_old_on_move (m , dev );
941938
942939 /* A change event can signal that a device is becoming ready, in particular if the device is using
943940 * the SYSTEMD_READY logic in udev so we need to reach the else block of the following if, even for
0 commit comments