[geany/geany] 5eb526: Improve implementation of utils_str_equal()
Colomban Wendling
git-noreply at xxxxx
Sun Apr 27 20:36:25 UTC 2014
Branch: refs/heads/master
Author: Colomban Wendling <ban at herbesfolles.org>
Committer: Colomban Wendling <ban at herbesfolles.org>
Date: Sun, 27 Apr 2014 20:36:25 UTC
Commit: 5eb526f9d0385fb62f83425c3ccdc13b3940d17f
https://github.com/geany/geany/commit/5eb526f9d0385fb62f83425c3ccdc13b3940d17f
Log Message:
-----------
Improve implementation of utils_str_equal()
Modified Paths:
--------------
src/utils.c
Modified: src/utils.c
6 lines changed, 1 insertions(+), 5 deletions(-)
===================================================================
@@ -584,11 +584,7 @@ gboolean utils_str_equal(const gchar *a, const gchar *b)
if (a == NULL && b == NULL) return TRUE;
else if (a == NULL || b == NULL) return FALSE;
- while (*a == *b++)
- if (*a++ == '\0')
- return TRUE;
-
- return FALSE;
+ return strcmp(a, b) == 0;
}
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list