After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 348317 - tiny code cleanup in gimplevelstool.c
tiny code cleanup in gimplevelstool.c
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Tools
2.2.x
Other All
: Normal trivial
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2006-07-22 07:37 UTC by Wim Lewis
Modified: 2008-01-15 13:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to simplify levels_input_area_event() a little (877 bytes, patch)
2006-07-22 07:39 UTC, Wim Lewis
committed Details | Review

Description Wim Lewis 2006-07-22 07:37:59 UTC
No reason to convert to ASCII and back just to round off a number. (Also, my compiler whines whenever someone uses sprintf() instead of snprintf().)
Comment 1 Wim Lewis 2006-07-22 07:39:45 UTC
Created attachment 69372 [details] [review]
Patch to simplify levels_input_area_event() a little
Comment 2 Michael Natterer 2006-07-25 09:45:37 UTC
Thanks for the patch, this was really ugly. Fixed in CVS:

2006-07-25  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimplevelstool.c (levels_input_area_event): Applied
	patch from Wim Lewis which fixes major uglyness (the code was
	rounding using sprintf() and atof() -- puke). Fixes bug #348317.


...and btw the replacement for sprintf() is g_snprintf() since apparently
there are some platforms witch a broken or missing snprintf().