[PATCH] Ticket #473: Add option of saving User ID in xml
Venkatesh Shukla
venkatesh.shukla.eee11 at iitbhu.ac.in
Thu Apr 10 23:17:35 PDT 2014
On Fri, Apr 11, 2014 at 10:51 AM, Dirk Hohndel <dirk at hohndel.org> wrote:
> On Fri, 2014-04-11 at 08:34 +0530, Venkatesh Shukla wrote:
>
> > +static void parse_settings_userid(char *line, struct
> > membuffer *str,
> > void *_unused)
> > +{
> > + char *uid = line;
> > + if (uid)
> > + {
> > + set_save_userid_local(true);
> > + set_userid(uid);
> > + }
> > +}
> >
> > Why do you have that local variable "uid"? Wouldn't it be much
> > easier to
> > just use "line"?
>
> careful... this is not what I meant:
>
> +static void parse_settings_userid(char *line, struct membuffer *str, void
> *_unused)
> +{
> + set_save_userid_local(true);
> + set_userid(line);
> +}
> +
>
> Notice the difference?
>
Damn. I ignored the null pointer check. I am re-adding that in the patch.
Sorry.
Also, I noticed that the if statement did not adhere to the coding style.
Fixed it too.
>
> > As you have hinted, there might be more problems in this patch. Please
> > do mention them so that I can improve both the patch and myself.
> > Eagerly waiting for your feedbacks.
>
> I didn't see anything else staring out at me. Would anyone else be so
> kind to take a look, please? My brain is pretty much flat lining...
Thank You Dirk.
I hope somebody would indeed look into my patch and send some feedback or
suggestion. I am in the same condition given my approaching semester
examinations.
--
*Venkatesh Shukla *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20140411/6b909a20/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Adds-option-of-saving-userid-in-local-files.patch
Type: text/x-patch
Size: 12857 bytes
Desc: not available
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20140411/6b909a20/attachment-0001.bin>
More information about the subsurface
mailing list