|
Message-ID: <CABob6irRrqyGrTB18tsQagS94LHZXiHEG9k6FxeMsszFe0cm6A@mail.gmail.com> Date: Tue, 19 Mar 2013 01:20:02 +0100 From: Lukas Odzioba <lukas.odzioba@...il.com> To: john-dev@...ts.openwall.com Subject: Re: basename portability 'fix'. 2013/3/19 magnum <john.magnum@...hmail.com>: > Parts of your patch has CRLF and parts of it does not. This made git disregard most of it as "whitespace errors" :-) Also, I get this: > > misc.c: In function 'jtr_basename_r': > misc.c:199:19: warning: variable 'name' set but not used [-Wunused-but-set-variable] > misc.c: In function 'jtr_basename_r': > misc.c:199:19: warning: variable 'name' set but not used [-Wunused-but-set-variable] > > I guess we can just drop all statements that declare or set name? 1) I think so, and moreover in my opinion it would be better if we change param from _name to just name; 2) I really am not convinced that we need two versions of this function. Since it is not performance critical I would leave just thread safe one. 3) Great job, thx! > If this is safer than our portability workarounds, I suppose Lukas could merge it to his get_basename() code that also strips an arbitrary list of extensions. Merging may be not a good idea after all. Maybe it would be better to create: strip_extensions(name,ext,num); and call this like that: strip_extensions(jtr_basename(path),ext,num); Lukas
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.