mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
Cleanups
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@666 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -910,7 +910,7 @@ uint64_t gen_dev_id_num(const struct vdisk_dev *dev)
|
||||
{
|
||||
unsigned int dev_id_num, i;
|
||||
|
||||
for (dev_id_num = 0, i = 0; i < (int)strlen(dev->name); i++) {
|
||||
for (dev_id_num = 0, i = 0; i < strlen(dev->name); i++) {
|
||||
unsigned int rv = random_values[(int)(dev->name[i])];
|
||||
/* do some rotating of the bits */
|
||||
dev_id_num ^= ((rv << i) | (rv >> (32 - i)));
|
||||
|
||||
@@ -171,8 +171,7 @@ void sigalrm_handler(int signo)
|
||||
res = ioctl(dev.scst_usr_fd, SCST_USER_FLUSH_CACHE, NULL);
|
||||
if (res != 0) {
|
||||
res = errno;
|
||||
PRINT_ERROR("Unable to flush cache: %s",
|
||||
strerror(res));
|
||||
PRINT_ERROR("Unable to flush cache: %s", strerror(res));
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user