bugGKSu - Bugs: bug #32347, I found something unoptimal in...


bug #32347: I found something unoptimal in sourcecode.

Submitter:  None
Submitted:  Fri 04 Feb 2011 01:39:23 AM UTC
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup

Fri 04 Feb 2011 01:39:23 AM UTC, original submission:  

I'm not a member of your community and wont to be him (at least at this time).
But I'm interested in your code. I found a part of it unoptimal (it's my opinion, it may be wrong, because i'm not qualified in programming - i'm just studying (and it's the reason for analysis of your source code)).

From words to action:

in libgksu.c:

  /* we cannot pass 'password' as it has no \n */
  pass = g_strdup_printf ("%s\n", password);
  write (fdpty, pass, strlen(pass));

  /* cleans the memory */
  gksu_secure_free (pass);
  gksu_secure_free (password);

may be:

  write (fdpty, password, strlen(password));
  write (fdpty, \n, 1);
  gksu_secure_free (password);

we no need the `pass` variable, we no need `g_strdup_printf`.

Am I wrong?

Sorry for my bad english.
My public e-mail: -email is unavailable-



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


CC list is empty


There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.


No changes have been made to this item

Back to the top

Powered by Savane 3.12