From: <ch...@su...> - 2013-07-11 09:35:31
|
Hi! > > > +static int tst_kexvcmp(char *tst_exv, char *cur_ver) > > > +{ > > > + int c1 = 0, c2 = 0, t1 = 0, t2 = 0; > > > + int ret; > > > + > > > + sscanf(cur_ver, "%*d.%*d.%*d-%d.%d", &c1, &c2); > > > + sscanf(tst_exv, "%d.%d", &t1, &t2); > > > + if ((ret = c1 - t1)) > > > > not sure if the brackets are duplicated... > > What caught my (and checkpatch's) eye is that these are assignments in if condition, > but I'm not sure how strictly we take checkpatch output. Assignment inside of condition is generally considered as a tricky statement which is why checkpatch gives a warning. I'm personally not against it as long as it's simple statement like this but if other people here disagree I'm fine with treating it as a wrong thing to do. -- Cyril Hrubis ch...@su... |