iliaa Mon Sep 22 19:27:53 2003 EDT Modified files: /php-src/ext/exif exif.c /php-src/ext/mysql php_mysql.c Log: String format stuff. Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.157 php-src/ext/exif/exif.c:1.158 --- php-src/ext/exif/exif.c:1.157 Sun Sep 7 19:46:33 2003 +++ php-src/ext/exif/exif.c Mon Sep 22 19:27:51 2003 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: exif.c,v 1.157 2003/09/07 23:46:33 helly Exp $ */ +/* $Id: exif.c,v 1.158 2003/09/22 23:27:51 iliaa Exp $ */ /* ToDos * @@ -111,7 +111,7 @@ }; /* }}} */ -#define EXIF_VERSION "1.4 $Id: exif.c,v 1.157 2003/09/07 23:46:33 helly Exp $" +#define EXIF_VERSION "1.4 $Id: exif.c,v 1.158 2003/09/22 23:27:51 iliaa Exp $" /* {{{ PHP_MINFO_FUNCTION */ @@ -255,10 +255,10 @@ 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: php-src/ext/mysql/php_mysql.c diff -u php-src/ext/mysql/php_mysql.c:1.199 php-src/ext/mysql/php_mysql.c:1.200 --- php-src/ext/mysql/php_mysql.c:1.199 Thu Aug 28 15:17:34 2003 +++ php-src/ext/mysql/php_mysql.c Mon Sep 22 19:27:51 2003 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mysql.c,v 1.199 2003/08/28 19:17:34 iliaa Exp $ */ +/* $Id: php_mysql.c,v 1.200 2003/09/22 23:27:51 iliaa Exp $ */ /* TODO: * @@ -425,9 +425,7 @@ { 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 @@ 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 @@ /* 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;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php