]> granicus.if.org Git - php/commitdiff
String format stuff.
authorIlia Alshanetsky <iliaa@php.net>
Mon, 22 Sep 2003 23:27:51 +0000 (23:27 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 22 Sep 2003 23:27:51 +0000 (23:27 +0000)
ext/exif/exif.c
ext/mysql/php_mysql.c

index 5d33a447e99a51d2bbde75188ef51ce9d3e0efd4..db45c901c7efe196c53c50f3bbf1899972592ca8 100644 (file)
@@ -255,10 +255,10 @@ static const char * EXIF_ERROR_CORRUPT   = "File structure corrupted";
 static const char * EXIF_ERROR_THUMBEOF  = "Thumbnail goes IFD boundary or end of file reached";
 static const char * EXIF_ERROR_FSREALLOC = "Illegal reallocating of undefined file section";
 
-#define EXIF_ERRLOG_FILEEOF(ImageInfo)    exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, EXIF_ERROR_FILEEOF);
-#define EXIF_ERRLOG_CORRUPT(ImageInfo)    exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, EXIF_ERROR_CORRUPT);
-#define EXIF_ERRLOG_THUMBEOF(ImageInfo)   exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, EXIF_ERROR_THUMBEOF);
-#define EXIF_ERRLOG_FSREALLOC(ImageInfo)  exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, EXIF_ERROR_FSREALLOC);
+#define EXIF_ERRLOG_FILEEOF(ImageInfo)    exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, "%s", EXIF_ERROR_FILEEOF);
+#define EXIF_ERRLOG_CORRUPT(ImageInfo)    exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, "%s", EXIF_ERROR_CORRUPT);
+#define EXIF_ERRLOG_THUMBEOF(ImageInfo)   exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, "%s", EXIF_ERROR_THUMBEOF);
+#define EXIF_ERRLOG_FSREALLOC(ImageInfo)  exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, "%s", EXIF_ERROR_FSREALLOC);
 /* }}} */
 
 /* {{{ format description defines
index e720c35a439eabe02a308308ec40c103b5eb5144..f4431d31e6b4687befed835a56d8f91c71e03fbb 100644 (file)
@@ -425,9 +425,7 @@ PHP_RSHUTDOWN_FUNCTION(mysql)
 {
        if (MySG(trace_mode)) {
                if (MySG(result_allocated)){
-                       char tmp[128];
-                       sprintf((char *)&tmp, "%lu result set(s) not freed. Use mysql_free_result to free result sets which were requested using mysql_query()", MySG(result_allocated));
-                       php_error_docref("function.mysql-free-result" TSRMLS_CC, E_WARNING, tmp);
+                       php_error_docref("function.mysql-free-result" TSRMLS_CC, E_WARNING, "%lu result set(s) not freed. Use mysql_free_result to free result sets which were requested using mysql_query()", MySG(result_allocated));
                }
        }
 
@@ -1239,7 +1237,7 @@ static void php_mysql_do_query_general(zval **query, zval **mysql_link, int link
                        mysql_real_query(&mysql->conn, newquery, strlen(newquery));
                        efree (newquery);
                        if (mysql_errno(&mysql->conn)) {
-                               php_error_docref("http://www.mysql.com/doc" TSRMLS_CC, E_WARNING, mysql_error(&mysql->conn));
+                               php_error_docref("http://www.mysql.com/doc" TSRMLS_CC, E_WARNING, "%s", mysql_error(&mysql->conn));
                                RETURN_FALSE;
                        }
                        else {
@@ -1272,7 +1270,7 @@ static void php_mysql_do_query_general(zval **query, zval **mysql_link, int link
                /* check possible error */
                if (MySG(trace_mode)){
                        if (mysql_errno(&mysql->conn)){
-                               php_error_docref("http://www.mysql.com/doc" TSRMLS_CC, E_WARNING, mysql_error(&mysql->conn)); 
+                               php_error_docref("http://www.mysql.com/doc" TSRMLS_CC, E_WARNING, "%s", mysql_error(&mysql->conn)); 
                        }
                }
                RETURN_FALSE;