errno must be set to 0 before calling strtoll or error checking will have false positives --- libopeniscsiusr/sysfs.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/libopeniscsiusr/sysfs.c b/libopeniscsiusr/sysfs.c index 6f295b702821..d312d4e299d0 100644 --- a/libopeniscsiusr/sysfs.c +++ b/libopeniscsiusr/sysfs.c @@ -229,6 +229,7 @@ static int iscsi_sysfs_prop_get_ll(struct iscsi_context *ctx, } } + errno = 0; tmp_val = strtoll((const char *) buff, NULL, 10 /* base */); errno_save = errno; if ((errno_save != 0) && (! ignore_error)) { -- 2.14.4 -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscr...@googlegroups.com. To post to this group, send email to open-iscsi@googlegroups.com. Visit this group at https://groups.google.com/group/open-iscsi. For more options, visit https://groups.google.com/d/optout.